orgswitcher: update test
This commit is contained in:
@@ -21,7 +21,7 @@ describe('OrgSwitcher', () => {
|
|||||||
|
|
||||||
const orgSwitcherCtrl = new OrgSwitchCtrl(backendSrvStub);
|
const orgSwitcherCtrl = new OrgSwitchCtrl(backendSrvStub);
|
||||||
|
|
||||||
orgSwitcherCtrl.getWindowLocationHref = () => 'http://localhost:3000?orgId=1';
|
orgSwitcherCtrl.getWindowLocationHref = () => 'http://localhost:3000?orgId=1&from=now-3h&to=now';
|
||||||
orgSwitcherCtrl.setWindowLocationHref = (href) => expectedHref = href;
|
orgSwitcherCtrl.setWindowLocationHref = (href) => expectedHref = href;
|
||||||
|
|
||||||
return orgSwitcherCtrl.setUsingOrg({orgId: 2});
|
return orgSwitcherCtrl.setUsingOrg({orgId: 2});
|
||||||
@@ -32,7 +32,7 @@ describe('OrgSwitcher', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should switch orgId in url', () => {
|
it('should switch orgId in url', () => {
|
||||||
expect(expectedHref).toBe('http://localhost:3000?orgId=2');
|
expect(expectedHref).toBe('http://localhost:3000?orgId=2&from=now-3h&to=now');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user