mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
remove old auth test not valid anymore
This commit is contained in:
@@ -243,33 +243,6 @@ describe('AuthenticationService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[ECM] ticket should be deleted only after logout request is accepted', (done) => {
|
|
||||||
let disposableLogin = authService.login('fake-username', 'fake-password').subscribe(() => {
|
|
||||||
let logoutPromise = authService.logout();
|
|
||||||
|
|
||||||
expect(authService.getTicketEcm()).toBe('fake-post-ticket');
|
|
||||||
|
|
||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
|
||||||
'status': 204
|
|
||||||
});
|
|
||||||
|
|
||||||
let disposableLogout = logoutPromise.subscribe(() => {
|
|
||||||
expect(authService.isLoggedIn()).toBe(false);
|
|
||||||
expect(authService.isEcmLoggedIn()).toBe(false);
|
|
||||||
disposableLogin.unsubscribe();
|
|
||||||
disposableLogout.unsubscribe();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
|
||||||
'status': 201,
|
|
||||||
contentType: 'application/json',
|
|
||||||
responseText: JSON.stringify({ 'entry': { 'id': 'fake-post-ticket', 'userId': 'admin' } })
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[ECM] should return false if the user is not logged in', () => {
|
it('[ECM] should return false if the user is not logged in', () => {
|
||||||
expect(authService.isLoggedIn()).toBe(false);
|
expect(authService.isLoggedIn()).toBe(false);
|
||||||
expect(authService.isEcmLoggedIn()).toBe(false);
|
expect(authService.isEcmLoggedIn()).toBe(false);
|
||||||
@@ -368,31 +341,6 @@ describe('AuthenticationService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[BPM] ticket should be deleted only after logout request is accepted', (done) => {
|
|
||||||
let disposableLogin = authService.login('fake-username', 'fake-password').subscribe(() => {
|
|
||||||
let logoutPromise = authService.logout();
|
|
||||||
|
|
||||||
expect(authService.getTicketBpm()).toBe('Basic ZmFrZS11c2VybmFtZTpmYWtlLXBhc3N3b3Jk');
|
|
||||||
|
|
||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
|
||||||
'status': 200
|
|
||||||
});
|
|
||||||
|
|
||||||
let disposableLogout = logoutPromise.subscribe(() => {
|
|
||||||
expect(authService.isLoggedIn()).toBe(false);
|
|
||||||
expect(authService.isBpmLoggedIn()).toBe(false);
|
|
||||||
disposableLogout.unsubscribe();
|
|
||||||
disposableLogin.unsubscribe();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
|
||||||
'status': 200
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[BPM] should return a ticket undefined after logout', (done) => {
|
it('[BPM] should return a ticket undefined after logout', (done) => {
|
||||||
let disposableLogin = authService.login('fake-username', 'fake-password').subscribe(() => {
|
let disposableLogin = authService.login('fake-username', 'fake-password').subscribe(() => {
|
||||||
let disposableLogout = authService.logout().subscribe(() => {
|
let disposableLogout = authService.logout().subscribe(() => {
|
||||||
|
Reference in New Issue
Block a user