mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 20:13:07 +00:00
71504: Shortlived tokens + file-download-link test cases
This commit is contained in:
@@ -9,6 +9,7 @@ import { EPersonMock } from './eperson.mock';
|
||||
export class AuthRequestServiceStub {
|
||||
protected mockUser: EPerson = EPersonMock;
|
||||
protected mockTokenInfo = new AuthTokenInfo('test_token');
|
||||
protected mockShortLivedToken = 'test-shortlived-token';
|
||||
|
||||
public postToEndpoint(method: string, body: any, options?: HttpOptions): Observable<any> {
|
||||
const authStatusStub: AuthStatus = new AuthStatus();
|
||||
@@ -82,4 +83,8 @@ export class AuthRequestServiceStub {
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
public getShortlivedToken() {
|
||||
return observableOf(this.mockShortLivedToken);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user