Make test organization names more unique

The addition of a uniqueness validation on Organization#name is causing
a lot of random failures; the Organization factory uses a Faker value,
but appears to be producing repetitive results, so I've added a
FactoryGirl sequence to ensure uniqueness.
This commit is contained in:
James Mason 2018-02-28 09:34:43 -08:00 committed by Ana María Martínez Gómez
parent b1960c08ef
commit 44fd794416

View file

@ -1,6 +1,6 @@
FactoryGirl.define do
factory :organization do
name { Faker::Company.name }
sequence(:name) { |n| "#{Faker::Company.name} #{n}" }
description { Faker::Lorem.paragraph }
# after(:create) do |organization|