From bf9b785008665697ec2e98aa9b335f6062b9ebb0 Mon Sep 17 00:00:00 2001 From: Jamie Levinson Date: Thu, 8 Oct 2015 13:09:41 -0500 Subject: [PATCH] Add test --- src/analytics-manager.spec.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/analytics-manager.spec.js b/src/analytics-manager.spec.js index fc8615f..1cefea5 100644 --- a/src/analytics-manager.spec.js +++ b/src/analytics-manager.spec.js @@ -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); + }); }); });