feat: deliver RSchedule service login exams and elastic glass navigation
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:hepan_everyday/features/school/school_session.dart';
|
||||
import 'package:hepan_everyday/features/school/school_navigation_policy.dart';
|
||||
|
||||
void main() {
|
||||
test(
|
||||
'login starts at graduate-specific service and accepts its HTTP callback',
|
||||
() {
|
||||
expect(SchoolSession.authUrl.path, '/pyxx/jzsso/login');
|
||||
expect(SchoolSession.authUrl.host, 'yjsjy.uestc.edu.cn');
|
||||
expect(
|
||||
SchoolNavigationPolicy.isSchoolPage(
|
||||
Uri.parse(
|
||||
'http://yjsjy.uestc.edu.cn/pyxx/jzsso/login?ticket=ST-example',
|
||||
),
|
||||
),
|
||||
isTrue,
|
||||
);
|
||||
expect(
|
||||
SchoolNavigationPolicy.isSchoolPage(
|
||||
Uri.parse('http://idas.uestc.edu.cn/authserver/login'),
|
||||
),
|
||||
isFalse,
|
||||
);
|
||||
expect(
|
||||
SchoolNavigationPolicy.isSchoolPage(
|
||||
Uri.parse('http://yjsjy.uestc.edu.cn.evil.test/pyxx/jzsso/login'),
|
||||
),
|
||||
isFalse,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user