mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
fixing tests
This commit is contained in:
parent
0783acc9e5
commit
dd94ec8a72
@ -24,12 +24,13 @@ class MockNetworkService {
|
||||
}
|
||||
|
||||
class MockShareService {
|
||||
setUserObs(user: any) {
|
||||
onNewUser(user: any) {
|
||||
}
|
||||
}
|
||||
|
||||
describe('AuthenticationService', () => {
|
||||
beforeEach(() => {
|
||||
localStorage.clear();
|
||||
TestBed.configureTestingModule({
|
||||
providers: [
|
||||
VersionService,
|
||||
|
@ -47,7 +47,7 @@ describe('UserService', () => {
|
||||
spyOn(networkService, 'getJson');
|
||||
await userService.getSessionUser();
|
||||
expect(networkService.getJson).toHaveBeenCalled();
|
||||
expect((<any>networkService.getJson).calls.argsFor(0)).toEqual(['/user/login']);
|
||||
expect((<any>networkService.getJson).calls.argsFor(0)).toEqual(['/user/me']);
|
||||
}));
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user