diff options
Diffstat (limited to 'plugins/CoreHome/angularjs/common/services/piwik-api.spec.js')
-rw-r--r-- | plugins/CoreHome/angularjs/common/services/piwik-api.spec.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/CoreHome/angularjs/common/services/piwik-api.spec.js b/plugins/CoreHome/angularjs/common/services/piwik-api.spec.js index 1faf387ea3..e33fa329e2 100644 --- a/plugins/CoreHome/angularjs/common/services/piwik-api.spec.js +++ b/plugins/CoreHome/angularjs/common/services/piwik-api.spec.js @@ -55,7 +55,7 @@ piwikApi.fetch({ method: "SomePlugin.action" }).then(function (response) { - expect(response).to.equal("Request url: index.php?date=&format=JSON2&idSite=1&method=SomePlugin.action&module=API&period=day"); + expect(response).to.equal("Request url: index.php?method=SomePlugin.action&module=API&format=JSON2&idSite=1&period=day&date="); done(); }).catch(function (ex) { @@ -115,7 +115,7 @@ piwikApi.fetch({ method: "SomePlugin.action" }).then(function (response) { - expect(response).to.equal("Request url: index.php?date=&format=JSON2&idSite=1&method=SomePlugin.action&module=API&period=day"); + expect(response).to.equal("Request url: index.php?method=SomePlugin.action&module=API&format=JSON2&idSite=1&period=day&date="); request1Done = true; @@ -127,7 +127,7 @@ piwikApi.fetch({ method: "SomeOtherPlugin.action" }).then(function (response) { - expect(response).to.equal("Request url: index.php?date=&format=JSON2&idSite=1&method=SomeOtherPlugin.action&module=API&period=day"); + expect(response).to.equal("Request url: index.php?method=SomeOtherPlugin.action&module=API&format=JSON2&idSite=1&period=day&date="); request2Done = true; @@ -160,7 +160,7 @@ piwikApi.fetch({ method: "SomeOtherPlugin.action" }).then(function (response) { - expect(response).to.equal("Request url: index.php?date=&format=JSON2&idSite=1&method=SomeOtherPlugin.action&module=API&period=day"); + expect(response).to.equal("Request url: index.php?method=SomeOtherPlugin.action&module=API&format=JSON2&idSite=1&period=day&date="); request2Done = true; @@ -216,9 +216,9 @@ method: "SomeOtherPlugin.action" } ]).then(function (response) { - var restOfExpected = "index.php?date=&format=JSON2&idSite=1&method=API.getBulkRequest&" + - "module=API&period=day - urls%5B%5D=%3Fmethod%3DSomePlugin.action%26param%3D" + - "value&urls%5B%5D=%3Fmethod%3DSomeOtherPlugin.action&token_auth=100bf5eeeed1468f3f9d93750044d3dd"; + var restOfExpected = "index.php?method=API.getBulkRequest&module=API&format=JSON2&idSite=1&period=day&date= - " + + "urls%5B%5D=%3Fmethod%3DSomePlugin.action%26param%3Dvalue&urls%5B%5D=%3Fmethod%3DSomeOtherPlugin.action" + + "&token_auth=100bf5eeeed1468f3f9d93750044d3dd"; expect(response.length).to.equal(2); expect(response[0]).to.equal("Response #1: " + restOfExpected); |