]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/blob
6e3cf5dc257ec2c3300fa18a5d2e52a5f7241bb8
[ceph-ci.git] /
1 import { ComponentFixture, TestBed } from '@angular/core/testing';
2
3 import { configureTestBed } from '~/testing/unit-test-helper';
4 import { SsoNotFoundComponent } from './sso-not-found.component';
5
6 describe('SsoNotFoundComponent', () => {
7   let component: SsoNotFoundComponent;
8   let fixture: ComponentFixture<SsoNotFoundComponent>;
9
10   configureTestBed({
11     declarations: [SsoNotFoundComponent]
12   });
13
14   beforeEach(() => {
15     fixture = TestBed.createComponent(SsoNotFoundComponent);
16     component = fixture.componentInstance;
17     fixture.detectChanges();
18   });
19
20   it('should create', () => {
21     expect(component).toBeTruthy();
22   });
23
24   it('should render the correct logout url', () => {
25     const expectedUrl = `http://localhost/auth/saml2/slo`;
26     const logoutAnchor = fixture.debugElement.nativeElement.querySelector('.sso-logout');
27
28     expect(logoutAnchor.href).toEqual(expectedUrl);
29   });
30 });