Renamed display ad leftovers (test descriptions, swagger) (#20007)
This commit is contained in:
parent
f4a9c192c0
commit
7e83f18eca
6 changed files with 729 additions and 729 deletions
|
|
@ -34,7 +34,7 @@ FactoryBot.define do
|
||||||
|
|
||||||
experience_level_rating { rand(4..6) }
|
experience_level_rating { rand(4..6) }
|
||||||
# The tags property in the markdown is a bit of a hack, and this entire factory needs refactoring.
|
# The tags property in the markdown is a bit of a hack, and this entire factory needs refactoring.
|
||||||
# In the Tagglable spec we want to extract some common scopes from the article and display ad
|
# In the Tagglable spec we want to extract some common scopes from the article and billboard
|
||||||
# models and test them, hence we want to pass through the tag_list property.
|
# models and test them, hence we want to pass through the tag_list property.
|
||||||
# However, the body_markdown caters for the way that we associate tags for the v1 editor.
|
# However, the body_markdown caters for the way that we associate tags for the v1 editor.
|
||||||
# Hence, in this test we default to the transient with_tags being set to true, but if we pass a tag_list through
|
# Hence, in this test we default to the transient with_tags being set to true, but if we pass a tag_list through
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ require Rails.root.join(
|
||||||
|
|
||||||
describe DataUpdateScripts::GenerateDisplayAdNames do
|
describe DataUpdateScripts::GenerateDisplayAdNames do
|
||||||
context "when there is no name for a billboard" do
|
context "when there is no name for a billboard" do
|
||||||
it "generates a name for an existing Display Ad" do
|
it "generates a name for an existing Billboard" do
|
||||||
billboard = create(:billboard, name: nil)
|
billboard = create(:billboard, name: nil)
|
||||||
|
|
||||||
described_class.new.run
|
described_class.new.run
|
||||||
|
|
@ -13,7 +13,7 @@ describe DataUpdateScripts::GenerateDisplayAdNames do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when there is a name for the Display Ad" do
|
context "when there is a name for the Billboard" do
|
||||||
it "does not change the name" do
|
it "does not change the name" do
|
||||||
billboard = create(:billboard, name: "Test")
|
billboard = create(:billboard, name: "Test")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ RSpec.describe "/admin/customization/billboards" do
|
||||||
describe "DELETE /admin/billboards/:id" do
|
describe "DELETE /admin/billboards/:id" do
|
||||||
let!(:billboard) { create(:billboard) }
|
let!(:billboard) { create(:billboard) }
|
||||||
|
|
||||||
it "deletes the Display Ad" do
|
it "deletes the Billboard" do
|
||||||
expect do
|
expect do
|
||||||
delete admin_billboard_path(billboard.id)
|
delete admin_billboard_path(billboard.id)
|
||||||
end.to change { Billboard.all.count }.by(-1)
|
end.to change { Billboard.all.count }.by(-1)
|
||||||
|
|
@ -147,7 +147,7 @@ RSpec.describe "/admin/customization/billboards" do
|
||||||
describe "DELETE /admin/billboards/:id" do
|
describe "DELETE /admin/billboards/:id" do
|
||||||
let!(:billboard) { create(:billboard) }
|
let!(:billboard) { create(:billboard) }
|
||||||
|
|
||||||
it "deletes the Display Ad" do
|
it "deletes the Billboard" do
|
||||||
expect do
|
expect do
|
||||||
delete admin_billboard_path(billboard.id)
|
delete admin_billboard_path(billboard.id)
|
||||||
end.to change { Billboard.all.count }.by(-1)
|
end.to change { Billboard.all.count }.by(-1)
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ RSpec.describe "/admin/customization/html_variants" do
|
||||||
describe "DELETE /admin/customization/html_variants/:id" do
|
describe "DELETE /admin/customization/html_variants/:id" do
|
||||||
let!(:html_variant) { create(:html_variant) }
|
let!(:html_variant) { create(:html_variant) }
|
||||||
|
|
||||||
it "deletes the Display Ad" do
|
it "deletes the Billboard" do
|
||||||
expect do
|
expect do
|
||||||
delete admin_html_variant_path(html_variant.id)
|
delete admin_html_variant_path(html_variant.id)
|
||||||
end.to change { HtmlVariant.all.count }.by(-1)
|
end.to change { HtmlVariant.all.count }.by(-1)
|
||||||
|
|
@ -110,7 +110,7 @@ RSpec.describe "/admin/customization/html_variants" do
|
||||||
describe "DELETE /admin/customization/html_variants/:id" do
|
describe "DELETE /admin/customization/html_variants/:id" do
|
||||||
let!(:html_variant) { create(:html_variant) }
|
let!(:html_variant) { create(:html_variant) }
|
||||||
|
|
||||||
it "deletes the Display Ad" do
|
it "deletes the Billboard" do
|
||||||
expect do
|
expect do
|
||||||
delete admin_html_variant_path(html_variant.id)
|
delete admin_html_variant_path(html_variant.id)
|
||||||
end.to change { HtmlVariant.all.count }.by(-1)
|
end.to change { HtmlVariant.all.count }.by(-1)
|
||||||
|
|
|
||||||
|
|
@ -399,10 +399,10 @@ The default maximum value can be overridden by \"API_PER_PAGE_MAX\" environment
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Billboard: {
|
Billboard: {
|
||||||
description: "A Display Ad, aka Billboard, aka Widget",
|
description: "Billboard, aka Widget, ex. Display Ad",
|
||||||
type: :object,
|
type: :object,
|
||||||
properties: {
|
properties: {
|
||||||
id: { type: :integer, description: "The ID of the Display Ad" },
|
id: { type: :integer, description: "The ID of the Billboard" },
|
||||||
name: { type: :string, description: "For internal use, helps distinguish ads from one another" },
|
name: { type: :string, description: "For internal use, helps distinguish ads from one another" },
|
||||||
body_markdown: { type: :string, description: "The text (in markdown) of the ad (required)" },
|
body_markdown: { type: :string, description: "The text (in markdown) of the ad (required)" },
|
||||||
approved: { type: :boolean, description: "Ad must be both published and approved to be in rotation" },
|
approved: { type: :boolean, description: "Ad must be both published and approved to be in rotation" },
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue