-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(nextcloud): Add tests for files_sharing createShare and getShares
Signed-off-by: provokateurin <[email protected]>
- Loading branch information
1 parent
8e7a47d
commit d74bba7
Showing
3 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
118 changes: 118 additions & 0 deletions
118
packages/nextcloud/test/api/files_sharing/files_sharing_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:nextcloud/core.dart' as core; | ||
import 'package:nextcloud/files_sharing.dart' as files_sharing; | ||
import 'package:nextcloud/webdav.dart' as webdav; | ||
import 'package:nextcloud_test/nextcloud_test.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
presets('server', 'files_sharing', (tester) { | ||
group('shareapi', () { | ||
test('createShare', () async { | ||
final file = File('test/files/test.png'); | ||
await tester.client.webdav.putFile(file, file.statSync(), webdav.PathUri.parse('create-share.png')); | ||
addTearDown(() async { | ||
closeFixture(); | ||
await tester.client.webdav.delete(webdav.PathUri.parse('create-share.png')); | ||
}); | ||
|
||
final response = await tester.client.filesSharing.shareapi.createShare( | ||
$body: files_sharing.ShareapiCreateShareRequestApplicationJson( | ||
(b) => b | ||
..path = '/create-share.png' | ||
..shareType = core.ShareType.user.index | ||
..shareWith = 'user2', | ||
), | ||
); | ||
expect(response.statusCode, 200); | ||
expect(() => response.headers, isA<void>()); | ||
expect(response.body.ocs.data.canDelete, true); | ||
expect(response.body.ocs.data.canEdit, true); | ||
expect(response.body.ocs.data.displaynameFileOwner, 'User One'); | ||
expect(response.body.ocs.data.displaynameOwner, 'User One'); | ||
expect(response.body.ocs.data.fileParent, isPositive); | ||
expect(response.body.ocs.data.fileSource, isPositive); | ||
expect(response.body.ocs.data.fileTarget, '/create-share.png'); | ||
expect(response.body.ocs.data.hasPreview, true); | ||
expect(response.body.ocs.data.hideDownload, files_sharing.Share_HideDownload.$0); | ||
expect(response.body.ocs.data.id, isNotEmpty); | ||
expect(response.body.ocs.data.itemMtime, isPositive); | ||
expect(response.body.ocs.data.itemPermissions, 27); | ||
expect(response.body.ocs.data.itemSize, 8650); | ||
expect(response.body.ocs.data.itemSource, isPositive); | ||
expect(response.body.ocs.data.itemType, files_sharing.Share_ItemType.file); | ||
expect(response.body.ocs.data.label, ''); | ||
expect(response.body.ocs.data.mailSend, files_sharing.Share_MailSend.$1); | ||
expect(response.body.ocs.data.mimetype, 'image/png'); | ||
expect(response.body.ocs.data.note, ''); | ||
expect(response.body.ocs.data.path, '/create-share.png'); | ||
expect(response.body.ocs.data.permissions, 19); | ||
expect(response.body.ocs.data.shareType, core.ShareType.user.index); | ||
expect(response.body.ocs.data.shareWith, 'user2'); | ||
expect(response.body.ocs.data.shareWithDisplayname, 'User Two'); | ||
expect(response.body.ocs.data.shareWithDisplaynameUnique, 'user2'); | ||
expect(response.body.ocs.data.stime, isPositive); | ||
expect(response.body.ocs.data.storage, isPositive); | ||
expect(response.body.ocs.data.storageId, 'home::user1'); | ||
expect(response.body.ocs.data.uidFileOwner, 'user1'); | ||
expect(response.body.ocs.data.uidOwner, 'user1'); | ||
}); | ||
|
||
test('getShares', () async { | ||
final file = File('test/files/test.png'); | ||
await tester.client.webdav.putFile(file, file.statSync(), webdav.PathUri.parse('list-shares.png')); | ||
addTearDown(() async { | ||
closeFixture(); | ||
await tester.client.webdav.delete(webdav.PathUri.parse('list-shares.png')); | ||
}); | ||
|
||
await tester.client.filesSharing.shareapi.createShare( | ||
$body: files_sharing.ShareapiCreateShareRequestApplicationJson( | ||
(b) => b | ||
..path = '/list-shares.png' | ||
..shareType = core.ShareType.user.index | ||
..shareWith = 'user2', | ||
), | ||
); | ||
|
||
final response = await tester.client.filesSharing.shareapi.getShares( | ||
path: '/list-shares.png', | ||
reshares: 'true', | ||
); | ||
expect(response.statusCode, 200); | ||
expect(() => response.headers, isA<void>()); | ||
expect(response.body.ocs.data.single.canDelete, true); | ||
expect(response.body.ocs.data.single.canEdit, true); | ||
expect(response.body.ocs.data.single.displaynameFileOwner, 'User One'); | ||
expect(response.body.ocs.data.single.displaynameOwner, 'User One'); | ||
expect(response.body.ocs.data.single.fileParent, isPositive); | ||
expect(response.body.ocs.data.single.fileSource, isPositive); | ||
expect(response.body.ocs.data.single.fileTarget, '/list-shares.png'); | ||
expect(response.body.ocs.data.single.hasPreview, true); | ||
expect(response.body.ocs.data.single.hideDownload, files_sharing.Share_HideDownload.$0); | ||
expect(response.body.ocs.data.single.id, isNotEmpty); | ||
expect(response.body.ocs.data.single.itemMtime, isPositive); | ||
expect(response.body.ocs.data.single.itemPermissions, 27); | ||
expect(response.body.ocs.data.single.itemSize, 8650); | ||
expect(response.body.ocs.data.single.itemSource, isPositive); | ||
expect(response.body.ocs.data.single.itemType, files_sharing.Share_ItemType.file); | ||
expect(response.body.ocs.data.single.label, null); | ||
expect(response.body.ocs.data.single.mailSend, files_sharing.Share_MailSend.$0); | ||
expect(response.body.ocs.data.single.mimetype, 'image/png'); | ||
expect(response.body.ocs.data.single.note, ''); | ||
expect(response.body.ocs.data.single.path, '/list-shares.png'); | ||
expect(response.body.ocs.data.single.permissions, 19); | ||
expect(response.body.ocs.data.single.shareType, core.ShareType.user.index); | ||
expect(response.body.ocs.data.single.shareWith, 'user2'); | ||
expect(response.body.ocs.data.single.shareWithDisplayname, 'User Two'); | ||
expect(response.body.ocs.data.single.shareWithDisplaynameUnique, 'user2'); | ||
expect(response.body.ocs.data.single.stime, isPositive); | ||
expect(response.body.ocs.data.single.storage, isPositive); | ||
expect(response.body.ocs.data.single.storageId, 'home::user1'); | ||
expect(response.body.ocs.data.single.uidFileOwner, 'user1'); | ||
expect(response.body.ocs.data.single.uidOwner, 'user1'); | ||
}); | ||
}); | ||
}); | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/nextcloud/test/fixtures/files_sharing/create_share.regexp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
PUT http://localhost/remote\.php/webdav/create-share\.png | ||
authorization: Bearer mock | ||
content-length: 8650 | ||
content-type: application/xml | ||
ocs-apirequest: true | ||
requesttoken: token | ||
.+ | ||
POST http://localhost/ocs/v2\.php/apps/files_sharing/api/v1/shares | ||
accept: application/json | ||
authorization: Bearer mock | ||
content-type: application/json; charset=utf-8 | ||
ocs-apirequest: true | ||
\{"shareType":0,"publicUpload":"false","password":"","expireDate":"","note":"","label":"","path":"/create-share\.png","shareWith":"user2"\} |
17 changes: 17 additions & 0 deletions
17
packages/nextcloud/test/fixtures/files_sharing/list_shares.regexp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
PUT http://localhost/remote\.php/webdav/list-shares\.png | ||
authorization: Bearer mock | ||
content-length: 8650 | ||
content-type: application/xml | ||
ocs-apirequest: true | ||
requesttoken: token | ||
iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAIAAABnsVYUAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AMPEAwo2\+TdNAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAACAASURBVHja7NgxAQAgDMAwQMH8O8IVJuiXSOjZfWcWAAAAAAD8diQAAAAAAKBgQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBD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CQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwCKNfglZ0nZIRwAAAABJRU5ErkJggg== | ||
POST http://localhost/ocs/v2\.php/apps/files_sharing/api/v1/shares | ||
accept: application/json | ||
authorization: Bearer mock | ||
content-type: application/json; charset=utf-8 | ||
ocs-apirequest: true | ||
\{"shareType":0,"publicUpload":"false","password":"","expireDate":"","note":"","label":"","path":"/list-shares\.png","shareWith":"user2"\} | ||
GET http://localhost/ocs/v2\.php/apps/files_sharing/api/v1/shares\?shared_with_me=false&reshares=true&subfiles=false&path=%2Flist-shares\.png&include_tags=false | ||
accept: application/json | ||
authorization: Bearer mock | ||
ocs-apirequest: true |