2016-05-03 04:13:19 +00:00
|
|
|
import 'dart:io';
|
|
|
|
import 'package:angel_framework/angel_framework.dart';
|
|
|
|
import 'package:angel_auth/angel_auth.dart';
|
|
|
|
import 'package:http/http.dart' as http;
|
|
|
|
import 'package:test/test.dart';
|
2016-11-23 20:37:40 +00:00
|
|
|
import 'auth_token_test.dart' as authToken;
|
|
|
|
import 'local_test.dart' as local;
|
2016-05-03 04:13:19 +00:00
|
|
|
|
|
|
|
wireAuth(Angel app) async {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
main() async {
|
|
|
|
group('everything', () {
|
|
|
|
Angel app;
|
|
|
|
http.Client client;
|
|
|
|
String url;
|
|
|
|
|
|
|
|
setUp(() async {
|
|
|
|
client = new http.Client();
|
|
|
|
app = new Angel();
|
|
|
|
await app.configure(wireAuth);
|
|
|
|
HttpServer server = await app.startServer(
|
|
|
|
InternetAddress.LOOPBACK_IP_V4, 0);
|
|
|
|
url = "http://${server.address.host}:${server.port}";
|
|
|
|
});
|
|
|
|
|
|
|
|
tearDown(() async {
|
|
|
|
await app.httpServer.close(force: true);
|
|
|
|
client = null;
|
|
|
|
url = null;
|
|
|
|
});
|
|
|
|
|
2016-09-21 23:09:23 +00:00
|
|
|
group("JWT (de)serialization", authToken.main);
|
2016-09-21 06:19:52 +00:00
|
|
|
group("local", local.main);
|
|
|
|
|
2016-05-03 04:13:19 +00:00
|
|
|
test('can use login as middleware', () async {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test('successRedirect', () async {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test('failureRedirect', () async {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test('allow everything', () async {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test('force everything', () async {
|
|
|
|
|
|
|
|
});
|
2016-05-09 20:47:28 +00:00
|
|
|
|
|
|
|
test('logout', () async {
|
|
|
|
|
|
|
|
});
|
2016-05-03 04:13:19 +00:00
|
|
|
});
|
|
|
|
}
|