1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-11-24 08:42:24 +02:00
This commit is contained in:
Patrik J. Braun 2019-02-22 23:55:35 +01:00
parent 7d9d2b0244
commit 4891eed7b3

View File

@ -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,
]
});