Merge branch 'atomaka/bugfix/tests' into 'master'

Fix uniqueness issues with Faker

Faker will not always make unique data.  Let's toss a sequence on fields that require uniqueness.

See merge request !18
This commit is contained in:
Andrew Tomaka 2015-11-20 13:55:25 +00:00
commit 0e50dd92f8

View file

@ -1,6 +1,6 @@
FactoryGirl.define do
factory :subcreddit do
owner { create(:user) }
name { Faker::Team.name.first(21) } # 21 is the max length...brittle
sequence(:name) { |n| Faker::Team.name.first(18) + "#{n}" }
end
end