protevus/test/services/users_test.dart
2016-12-25 12:23:48 -05:00

27 lines
611 B
Dart

import 'dart:io';
import 'package:angel/angel.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_test/angel_test.dart';
import 'package:test/test.dart';
main() async {
Angel app;
TestClient client;
setUp(() async {
app = await createServer();
client = await connectTo(app);
});
tearDown(() async {
await client.close();
app = null;
});
test('index users', () async {
final response = await client.get('/api/users');
// By default, we locked this away from the Internet...
expect(response, hasStatus(HttpStatus.FORBIDDEN));
});
}