rewriting some factories

This commit is contained in:
2019-01-13 10:01:22 +01:00
parent fea219ba92
commit 71d14c83ae
7 changed files with 46 additions and 6 deletions

View File

@@ -1,11 +1,18 @@
FactoryGirl.define do
sequence (:email) {|n| "testuser#{n}@fet.at"}
factory :user do
email "testuser@test.at"
email
password "password"
password_confirmation "password"
factory :other_user do
email "othertest@test.at"
end
trait :fetuser do
after(:create) do |user|
user.after_create {|u| u.add_role("fetuser")}
end
end
end
end
end