Skip to content

Commit

Permalink
adding a test for current_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Purcer committed Jul 7, 2015
1 parent c3fb4d1 commit 736f5fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,14 @@ mpmodule("mixpanel");
equal(mixpanel.test.persistence.props[i_ref_d], "examixpanel.testle.com", "Just domain should be saved");
});

test("current url set correctly", 2, function() {
var current_url = "$current_url";
var event = mixpanel.test.track("check current url");
var props = event.properties;
ok(current_url in props, "current url in props");
equal(props[current_url], window.location.href, "current url is properly set");
});

test("set_config", 2, function() {
ok(!mixpanel.config.test, "test isn't set already");
mixpanel.set_config({ test: 1 });
Expand Down

0 comments on commit 736f5fe

Please sign in to comment.