* Change math in collection to represent the correct number of hidden posts. * Add test for correction truncation text. * Add aggregate_failures tag to collections spec Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com> Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
15 lines
334 B
Ruby
15 lines
334 B
Ruby
FactoryBot.define do
|
|
factory :collection do
|
|
user
|
|
sequence(:slug) { |n| "slug-#{n}" }
|
|
end
|
|
|
|
trait :with_articles do
|
|
transient do
|
|
amount { 3 }
|
|
end
|
|
after(:create) do |collection, evaluator|
|
|
create_list(:article, evaluator.amount, with_collection: collection, user: collection.user)
|
|
end
|
|
end
|
|
end
|