| library syncbase_app_test; |
| |
| import 'package:test/test.dart'; |
| |
| import 'package:ether/syncbase_client.dart' show SyncbaseClient; |
| |
| import './utils.dart' as utils; |
| |
| runAppTests(SyncbaseClient c) { |
| test('getting a handle to an app', () { |
| var appName = utils.uniqueName('app'); |
| var app = c.app(appName); |
| expect(app.relativeName, equals(appName)); |
| expect(app.fullName, equals(appName)); |
| }); |
| |
| test('creating and deleting an app', () async { |
| var appName = utils.uniqueName('app'); |
| var app = c.app(appName); |
| |
| expect(await app.exists(), equals(false)); |
| await app.create(utils.emptyPerms()); |
| expect(await app.exists(), equals(true)); |
| await app.delete(); |
| expect(await app.exists(), equals(false)); |
| }); |
| |
| // TODO(nlacasse): Test app.get/setPermissions. |
| } |