feat: add persistance to language selection
This commit is contained in:
@@ -1,19 +1,22 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ContactSearchBar } from './contact-search-bar';
|
||||
import { STRINGS_INJECTOR } from '../../app.config';
|
||||
import { strings } from '../../strings';
|
||||
import { LanguageManager } from '../../services/language-manager';
|
||||
|
||||
describe('ContactSearchBar', () => {
|
||||
let component: ContactSearchBar;
|
||||
let fixture: ComponentFixture<ContactSearchBar>;
|
||||
|
||||
let languageManager: jasmine.SpyObj<LanguageManager>;
|
||||
|
||||
beforeEach(async () => {
|
||||
languageManager = jasmine.createSpyObj(LanguageManager.name, [], { strings: strings.en });
|
||||
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [ContactSearchBar],
|
||||
providers: [{provide: STRINGS_INJECTOR, useValue: strings}]
|
||||
})
|
||||
.compileComponents();
|
||||
providers: [{ provide: LanguageManager, useValue: languageManager }],
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ContactSearchBar);
|
||||
component = fixture.componentInstance;
|
||||
|
||||
Reference in New Issue
Block a user