Fixes +10723 and adds extra tests

pull/223/head
Dana 2015-11-23 20:00:22 +00:00
rodzic a40ad9fe17
commit 48026f4b4b
2 zmienionych plików z 25 dodań i 17 usunięć

2
node_modules/c9/skip-analytics.js wygenerowano vendored
Wyświetl plik

@ -12,7 +12,7 @@ define(function(require, exports, module) {
function skipAnalytics(user) {
if (!user) return true;
if (user.id === -1) return true;
if (user.id === -1 || user.uid === -1) return true;
if (hasInternalTestName(user)) return true;
if (hasInternalDomain(user.email)) return true;

8
node_modules/c9/skip-analytics_test.js wygenerowano vendored
Wyświetl plik

@ -22,6 +22,14 @@ describe("skip-analytics", function() {
assert.equal(true, skipAnalytics(user), "skipAnalytics should return true when user id is -1");
});
it("returns true when user uid is -1", function() {
var user = {
uid: -1
};
assert.equal(true, skipAnalytics(user), "skipAnalytics should return true when user uid is -1");
});
it("returns false when user does not have an internal test name and no email", function() {
var user = {