fix unit test

Signed-off-by: Meina Zhou <meinaz@vmware.com>
This commit is contained in:
Meina Zhou 2019-03-21 14:58:47 +08:00
parent 130e132f86
commit 80b8440564
3 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ describe("CreateEditEndpointComponent (inline template)", () => {
endpointService = fixture.debugElement.injector.get(EndpointService);
spyAdapter = spyOn(endpointService, "getAdapters").and.returnValue(
Promise.resolve(mockAdapter)
of(mockAdapter)
);
spy = spyOn(endpointService, "getEndpoint").and.returnValue(

View File

@ -53,7 +53,7 @@ describe("CreateEditRuleComponent (inline template)", () => {
src_namespaces: ["name1", "name2"],
trigger: {
kind: "Manual",
schedule_param: null
schedule_param: {}
},
filters: [],
deletion: false
@ -154,7 +154,7 @@ describe("CreateEditRuleComponent (inline template)", () => {
src_registry_id: 10,
trigger: {
kind: "Manual",
schedule_param: null
schedule_param: {}
},
filters: [],
deletion: false

View File

@ -143,7 +143,7 @@ describe("EndpointComponent (inline template)", () => {
);
spyAdapter = spyOn(endpointService, "getAdapters").and.returnValue(
Promise.resolve(mockAdapter)
of(mockAdapter)
);
spyOnRules = spyOn(