Merge pull request #1571 from bertocq/fix/poll_factory_name_generation

Fix Poll factory name generation to guarantee uniqueness
This commit is contained in:
Juanjo Bazán
2017-05-30 10:39:43 +02:00
committed by GitHub

View File

@@ -388,7 +388,7 @@ FactoryGirl.define do
end end
factory :poll do factory :poll do
sequence(:name) { |n| "Poll #{Faker::StarWars.character}" } sequence(:name) { |n| "Poll #{SecureRandom.hex}" }
starts_at { 1.month.ago } starts_at { 1.month.ago }
ends_at { 1.month.from_now } ends_at { 1.month.from_now }