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
parent b1960c08ef
commit d563cd17a7
No known key found for this signature in database
GPG key ID: 1B3951886C449023

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|