refactor: edit chain to extend settings base add edit class
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ChainEditPage } from './chain-edit-page';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { of } from 'rxjs';
|
||||
import { Chain } from '../../../../models/Chain';
|
||||
import { ChainSettings } from '../../../../services/chain-settings';
|
||||
import { provideTranslateService } from '@ngx-translate/core';
|
||||
|
||||
describe('ChainEditPage', () => {
|
||||
let component: ChainEditPage;
|
||||
let fixture: ComponentFixture<ChainEditPage>;
|
||||
|
||||
let activatedRoute: Partial<ActivatedRoute>;
|
||||
|
||||
beforeEach(async () => {
|
||||
activatedRoute = {
|
||||
data: of({chain: new Chain('Mock', '', 1)}),
|
||||
};
|
||||
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [ChainEditPage],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute, useValue: activatedRoute },
|
||||
{ provide: ChainSettings, useValue: {} },
|
||||
provideTranslateService()
|
||||
],
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ChainEditPage);
|
||||
component = fixture.componentInstance;
|
||||
await fixture.whenStable();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user