diff --git a/test/javascripts/acceptance/adsense-test.js.es6 b/test/javascripts/acceptance/adsense-test.js.es6 index 6add41c..b449aa5 100644 --- a/test/javascripts/acceptance/adsense-test.js.es6 +++ b/test/javascripts/acceptance/adsense-test.js.es6 @@ -1,4 +1,4 @@ -import { acceptance, replaceCurrentUser } from "helpers/qunit-helpers"; +import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import groupFixtures from "fixtures/group-fixtures"; acceptance("AdSense", { @@ -32,7 +32,7 @@ acceptance("AdSense", { }); test("correct number of ads should show", async assert => { - replaceCurrentUser({ staff: false, trust_level: 1 }); + updateCurrentUser({ staff: false, trust_level: 1 }); await visit("/t/280"); // 20 posts const ads = find(".google-adsense.adsense-post-bottom"); assert.equal(ads.length, 3, "it should render 3 ads"); @@ -60,7 +60,7 @@ test("correct number of ads should show", async assert => { }); test("no ads for trust level 3", async assert => { - replaceCurrentUser({ staff: false, trust_level: 3 }); + updateCurrentUser({ staff: false, trust_level: 3 }); await visit("/t/280"); assert.equal( find(".google-adsense.adsense-post-bottom").length, @@ -70,7 +70,7 @@ test("no ads for trust level 3", async assert => { }); test("can omit ads based on groups", async assert => { - replaceCurrentUser({ + updateCurrentUser({ staff: false, trust_level: 1, groups: [groupFixtures["/groups/discourse.json"].group] diff --git a/test/javascripts/acceptance/dfp-test.js.es6 b/test/javascripts/acceptance/dfp-test.js.es6 index 1826479..769d264 100644 --- a/test/javascripts/acceptance/dfp-test.js.es6 +++ b/test/javascripts/acceptance/dfp-test.js.es6 @@ -1,4 +1,4 @@ -import { acceptance, replaceCurrentUser } from "helpers/qunit-helpers"; +import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import groupFixtures from "fixtures/group-fixtures"; acceptance("DFP Ads", { @@ -32,7 +32,7 @@ acceptance("DFP Ads", { }); test("correct number of ads should show", async assert => { - replaceCurrentUser({ staff: false, trust_level: 1 }); + updateCurrentUser({ staff: false, trust_level: 1 }); await visit("/t/280"); // 20 posts const ads = find(".google-dfp-ad.dfp-ad-post-bottom"); assert.equal(ads.length, 3, "it should render 3 ads"); @@ -60,7 +60,7 @@ test("correct number of ads should show", async assert => { }); test("no ads for trust level 3", async assert => { - replaceCurrentUser({ staff: false, trust_level: 3 }); + updateCurrentUser({ staff: false, trust_level: 3 }); await visit("/t/280"); assert.equal( find(".google-dfp-ad.dfp-ad-post-bottom").length, @@ -70,7 +70,7 @@ test("no ads for trust level 3", async assert => { }); test("can omit ads based on groups", async assert => { - replaceCurrentUser({ + updateCurrentUser({ staff: false, trust_level: 1, groups: [groupFixtures["/groups/discourse.json"].group] diff --git a/test/javascripts/acceptance/house-ad-test.js.es6 b/test/javascripts/acceptance/house-ad-test.js.es6 index 4a0ba08..741a95e 100644 --- a/test/javascripts/acceptance/house-ad-test.js.es6 +++ b/test/javascripts/acceptance/house-ad-test.js.es6 @@ -1,4 +1,4 @@ -import { acceptance, replaceCurrentUser } from "helpers/qunit-helpers"; +import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; acceptance("House Ads", { loggedIn: true, @@ -28,7 +28,7 @@ acceptance("House Ads", { }); test("correct ads show", async assert => { - replaceCurrentUser({ staff: false, trust_level: 1 }); + updateCurrentUser({ staff: false, trust_level: 1 }); await visit("/t/280"); // 20 posts assert.equal( diff --git a/test/javascripts/acceptance/mixed-ads-test.js.es6 b/test/javascripts/acceptance/mixed-ads-test.js.es6 index c6c1b2b..14c5ebd 100644 --- a/test/javascripts/acceptance/mixed-ads-test.js.es6 +++ b/test/javascripts/acceptance/mixed-ads-test.js.es6 @@ -1,4 +1,4 @@ -import { acceptance, replaceCurrentUser } from "helpers/qunit-helpers"; +import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; acceptance("Mixed Ads", { loggedIn: true, @@ -39,7 +39,7 @@ acceptance("Mixed Ads", { }); test("correct ads show", async assert => { - replaceCurrentUser({ staff: false, trust_level: 1 }); + updateCurrentUser({ staff: false, trust_level: 1 }); await visit("/t/280"); // 20 posts const houseAdsCount = find(".house-creative").length;