71504: Shortlived tokens + file-download-link test cases

This commit is contained in:
Kristof De Langhe
2020-06-22 13:44:16 +02:00
parent b578aa408b
commit 24858fceab
4 changed files with 140 additions and 7 deletions

View File

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