Change MAX_TAG_LIST_SIZE for billboards to 25 (#19981)
This commit is contained in:
parent
9309f27164
commit
98cccdf0ef
2 changed files with 3 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ class DisplayAd < ApplicationRecord
|
|||
|
||||
HOME_FEED_PLACEMENTS = %w[feed_first feed_second feed_third].freeze
|
||||
|
||||
MAX_TAG_LIST_SIZE = 10
|
||||
MAX_TAG_LIST_SIZE = 25
|
||||
POST_WIDTH = 775
|
||||
SIDEBAR_WIDTH = 350
|
||||
LOW_IMPRESSION_COUNT = 1_000
|
||||
|
|
|
|||
|
|
@ -245,12 +245,12 @@ RSpec.describe DisplayAd do
|
|||
|
||||
describe ".validate_tag" do
|
||||
it "rejects more than 10 tags" do
|
||||
eleven_tags = "one, two, three, four, five, six, seven, eight, nine, ten, eleven"
|
||||
twenty_six_tags = Array.new(26) { SecureRandom.alphanumeric(8) }.join(", ")
|
||||
expect(build(:billboard,
|
||||
name: "This is a billboard",
|
||||
body_markdown: "Billboard Body",
|
||||
placement_area: "post_comments",
|
||||
tag_list: eleven_tags).valid?).to be(false)
|
||||
tag_list: twenty_six_tags).valid?).to be(false)
|
||||
end
|
||||
|
||||
it "rejects tags with length > 30" do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue