refactor: simplify getExploreUrl functions (#9831)

* remove payload from return signature

* Rename function and fix tests

* Lint

* fix tests

* Move useLegacyApi inquiry to exploreUtils
This commit is contained in:
Ville Brofeldt
2020-05-18 19:19:05 +03:00
committed by GitHub
parent 52285aeb04
commit 7a95c52d61
9 changed files with 57 additions and 90 deletions

View File

@@ -47,8 +47,8 @@ describe('chart actions', () => {
beforeEach(() => {
dispatch = sinon.spy();
urlStub = sinon
.stub(exploreUtils, 'getExploreUrlAndPayload')
.callsFake(() => ({ url: MOCK_URL, payload: {} }));
.stub(exploreUtils, 'getExploreUrl')
.callsFake(() => MOCK_URL);
fakeMetadata = { useLegacyApi: true };
metadataRegistryStub = sinon
.stub(chartlib, 'getChartMetadataRegistry')