This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 09a7b75d authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Fixing Tests

parent 9e3c5ecb
Branches
2 merge requests!17Initial Merge to Prepare Release 1.0.0,!1Resolve "Metadaten konsolideren"
......@@ -6,6 +6,8 @@ import { ProfileInfo } from 'app/layouts/profiles/profile-info.model';
import { NavbarComponent } from 'app/layouts/navbar/navbar.component';
import { AccountService } from 'app/core/auth/account.service';
import { ProfileService } from 'app/layouts/profiles/profile.service';
import { SearchService } from 'app/search/service/search-service'
import { FormBuilder } from '@angular/forms';
describe('Component Tests', () => {
describe('Navbar Component', () => {
......@@ -13,11 +15,14 @@ describe('Component Tests', () => {
let fixture: ComponentFixture<NavbarComponent>;
let accountService: AccountService;
let profileService: ProfileService;
let searchService: SearchService;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [GitsearchTestModule],
declarations: [NavbarComponent],
providers: [
FormBuilder
],
})
.overrideTemplate(NavbarComponent, '')
.compileComponents();
......@@ -28,6 +33,7 @@ describe('Component Tests', () => {
comp = fixture.componentInstance;
accountService = TestBed.get(AccountService);
profileService = TestBed.get(ProfileService);
searchService = TestBed.get(SearchService);
});
it('Should call profileService.getProfileInfo on init', () => {
......@@ -48,5 +54,16 @@ describe('Component Tests', () => {
// THEN
expect(accountService.isAuthenticated).toHaveBeenCalled();
});
/* TODO later
it('Should call searchService.searchPageDetails on search changed', () => {
// WHEN
comp.searchChanged();
// THEN
expect(searchService.searchPageDetails).toHaveBeenCalled();
});
*/
});
});
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment