Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Levinson committed Oct 8, 2015
1 parent 7d7a36b commit bf9b785
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/analytics-manager.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,23 @@ describe("AnalyticsManager", function() {
expect(path).to.equal(pathName + '?' + goodQuery);
});

it("should provide path without query parameters if no parameter is given", function () {});
it("should provide path without query parameters if no parameter is given", function () {
var pathName = '/one/two/three/four';
var queryParam = '';

subject.init({
site: 'testsite',
searchQueryParam: queryParam
});

sandbox.stub(subject, 'getWindowLocation').returns({
pathname: pathName,
search: pathName + '?hjghsgd&digg',
});

var path = subject.pathInfo();

expect(path).to.equal(pathName);
});
});
});

0 comments on commit bf9b785

Please sign in to comment.