1
0
mirror of synced 2026-08-05 18:06:54 +00:00

FIX: Calculate no ads for groups server side (#200)

If the selected group to not display ads to had its visibility set to
not be visible then this setting wouldn't work correctly because that
group wouldn't be available client side. The change moves that group
check to be server side so that we can correctly see all the groups that
should not see ads.
This commit is contained in:
Blake Erickson
2024-02-15 14:52:15 -07:00
committed by GitHub
parent 1677f7ae39
commit b0c95114ea
8 changed files with 16 additions and 18 deletions
@@ -48,6 +48,7 @@ acceptance("AdSense", function (needs) {
trust_level: 1,
groups: [AUTO_GROUPS.trust_level_1],
show_adsense_ads: true,
show_to_groups: true,
});
await visit("/t/280"); // 20 posts
+1
View File
@@ -45,6 +45,7 @@ acceptance("DFP Ads", function (needs) {
staff: false,
trust_level: 1,
show_dfp_ads: true,
show_to_groups: true,
});
await visit("/t/280"); // 20 posts
+1 -1
View File
@@ -38,7 +38,7 @@ acceptance("House Ads", function (needs) {
});
test("correct ads show", async (assert) => {
updateCurrentUser({ staff: false, trust_level: 1 });
updateCurrentUser({ staff: false, trust_level: 1, show_to_groups: true });
await visit("/t/280"); // 20 posts
assert
@@ -49,6 +49,7 @@ acceptance("Mixed Ads", function (needs) {
staff: false,
trust_level: 1,
show_dfp_ads: true,
show_to_groups: true,
});
await visit("/t/280"); // 20 posts