공개페이지 완료
This commit is contained in:
@@ -77,7 +77,7 @@ void main() {
|
||||
final data = await svc.enter(hash, password: 'pw');
|
||||
expect(data['token'], 'TKN');
|
||||
expect(WebStorage.getItem(PublicEventService.tokenKey(hash)), 'TKN');
|
||||
expect(fake.lastPath, '/api/public/' + hash);
|
||||
expect(fake.lastPath, '/api/public/$hash');
|
||||
});
|
||||
|
||||
test('removes saved token on 401/403', () async {
|
||||
@@ -115,7 +115,7 @@ void main() {
|
||||
handicap: 0,
|
||||
);
|
||||
|
||||
expect(fake.lastPath, '/api/public/' + hash + '/score');
|
||||
expect(fake.lastPath, '/api/public/$hash/score');
|
||||
expect(fake.lastHeaders?['Authorization'], 'Bearer TKN2');
|
||||
expect(fake.lastData['participantId'], '10');
|
||||
expect(fake.lastData['gameNumber'], 1);
|
||||
@@ -134,7 +134,7 @@ void main() {
|
||||
|
||||
final data = await svc.fetchEvent(hash);
|
||||
expect(data['event']['id'], 'E1');
|
||||
expect(fake.lastPath, '/api/public/' + hash);
|
||||
expect(fake.lastPath, '/api/public/$hash');
|
||||
expect(fake.lastHeaders?['Authorization'], 'Bearer TKF');
|
||||
});
|
||||
});
|
||||
@@ -162,7 +162,7 @@ void main() {
|
||||
WebStorage.setItem(PublicEventService.tokenKey(hash), 'TG');
|
||||
|
||||
await svc.addGuest(hash, name: '홍길동', phone: '010', gender: 'M', average: 190);
|
||||
expect(fake.lastPath, '/api/public/' + hash + '/guest');
|
||||
expect(fake.lastPath, '/api/public/$hash/guest');
|
||||
expect(fake.lastHeaders?['Authorization'], 'Bearer TG');
|
||||
expect(fake.lastData['name'], '홍길동');
|
||||
expect(fake.lastData['phone'], '010');
|
||||
|
||||
Reference in New Issue
Block a user