mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
fixed test
This commit is contained in:
@@ -5,8 +5,6 @@ import { AuthTokenInfo } from '../../core/auth/models/auth-token-info.model';
|
||||
import { EPerson } from '../../core/eperson/models/eperson.model';
|
||||
import { isNotEmpty } from '../empty.util';
|
||||
import { EPersonMock } from './eperson.mock';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../remote-data.utils';
|
||||
|
||||
export class AuthRequestServiceStub {
|
||||
protected mockUser: EPerson = EPersonMock;
|
||||
@@ -28,7 +26,14 @@ export class AuthRequestServiceStub {
|
||||
if (this.validateToken(token)) {
|
||||
authStatusStub.authenticated = true;
|
||||
authStatusStub.token = this.mockTokenInfo;
|
||||
authStatusStub.eperson = createSuccessfulRemoteDataObject$(this.mockUser);
|
||||
authStatusStub._links = {
|
||||
self: {
|
||||
href: 'dspace.org/api/status',
|
||||
},
|
||||
eperson: {
|
||||
href: this.mockUser._links.self.href
|
||||
}
|
||||
};
|
||||
} else {
|
||||
authStatusStub.authenticated = false;
|
||||
}
|
||||
@@ -49,7 +54,14 @@ export class AuthRequestServiceStub {
|
||||
if (this.validateToken(token)) {
|
||||
authStatusStub.authenticated = true;
|
||||
authStatusStub.token = this.mockTokenInfo;
|
||||
authStatusStub.eperson = createSuccessfulRemoteDataObject$(this.mockUser);
|
||||
authStatusStub._links = {
|
||||
self: {
|
||||
href: 'dspace.org/api/status',
|
||||
},
|
||||
eperson: {
|
||||
href: this.mockUser._links.self.href
|
||||
}
|
||||
};
|
||||
} else {
|
||||
authStatusStub.authenticated = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user