implemented a comprehensive Nextcloud file sharing system with support for user, group, and public link shares with gating based on server-side permissions; added sharing management interfaces including a share sheet; updated the file list with visual badges for incoming shares and improved OCS API response handling.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:marianum_mobile/api/marianumcloud/autocomplete/autocomplete_response.dart';
|
||||
import 'package:marianum_mobile/api/marianumcloud/files_sharing/queries/share/share.dart';
|
||||
|
||||
void main() {
|
||||
group('shareTypeFromSource', () {
|
||||
test('groups map to the group share type', () {
|
||||
expect(shareTypeFromSource('groups'), kShareTypeGroup);
|
||||
// Nextcloud sometimes suffixes the source (e.g. groups-exact).
|
||||
expect(shareTypeFromSource('groups-exact'), kShareTypeGroup);
|
||||
});
|
||||
|
||||
test('users map to the user share type', () {
|
||||
expect(shareTypeFromSource('users'), kShareTypeUser);
|
||||
});
|
||||
|
||||
test('unknown / null sources fall back to user', () {
|
||||
expect(shareTypeFromSource('remotes'), kShareTypeUser);
|
||||
expect(shareTypeFromSource(null), kShareTypeUser);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user