mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-11-24 08:42:24 +02:00
test fix
This commit is contained in:
parent
7d9d2b0244
commit
4891eed7b3
@ -6,6 +6,7 @@ import {AuthenticationService} from './authentication.service';
|
||||
import {NetworkService} from './network.service';
|
||||
import {ErrorDTO} from '../../../../common/entities/Error';
|
||||
import {VersionService} from '../version.service';
|
||||
import {ShareService} from '../../gallery/share.service';
|
||||
|
||||
class MockUserService {
|
||||
public login(credential: LoginCredential): Promise<UserDTO> {
|
||||
@ -22,6 +23,11 @@ class MockNetworkService {
|
||||
}
|
||||
}
|
||||
|
||||
class MockShareService {
|
||||
setUserObs(user: any) {
|
||||
}
|
||||
}
|
||||
|
||||
describe('AuthenticationService', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@ -29,6 +35,7 @@ describe('AuthenticationService', () => {
|
||||
VersionService,
|
||||
{provide: NetworkService, useClass: MockNetworkService},
|
||||
{provide: UserService, useClass: MockUserService},
|
||||
{provide: ShareService, useClass: MockShareService},
|
||||
AuthenticationService,
|
||||
]
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user