|
|
@ -1,14 +1,20 @@
|
|
|
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
|
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
|
|
|
|
|
|
import { DataService } from '../../../shared/services/data.service';
|
|
|
|
|
|
|
|
|
|
|
|
import { SignComponent } from './sign.component';
|
|
|
|
import { SignComponent } from './sign.component';
|
|
|
|
|
|
|
|
|
|
|
|
describe('SignComponent', () => {
|
|
|
|
describe('SignComponent', () => {
|
|
|
|
let component: SignComponent;
|
|
|
|
let component: SignComponent;
|
|
|
|
let fixture: ComponentFixture<SignComponent>;
|
|
|
|
let fixture: ComponentFixture<SignComponent>;
|
|
|
|
|
|
|
|
const mockDataService = jasmine.createSpyObj("DataService", ["getChildAPIUrl","setChildAPIUrl","getFiatRates",
|
|
|
|
|
|
|
|
"getAliasesFromPubkeys","signMessage","verifyMessage","handleErrorWithoutAlert","handleErrorWithAlert"]);
|
|
|
|
|
|
|
|
|
|
|
|
beforeEach(async(() => {
|
|
|
|
beforeEach(async(() => {
|
|
|
|
TestBed.configureTestingModule({
|
|
|
|
TestBed.configureTestingModule({
|
|
|
|
declarations: [ SignComponent ]
|
|
|
|
declarations: [ SignComponent ],
|
|
|
|
|
|
|
|
providers: [
|
|
|
|
|
|
|
|
{ provide: DataService, useValue: mockDataService }
|
|
|
|
|
|
|
|
]
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.compileComponents();
|
|
|
|
.compileComponents();
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|