mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Set test users to confirmed by default
This commit is contained in:
committed by
Rob Harrington
parent
91704d9df7
commit
69ea1e6d26
@@ -430,12 +430,18 @@ FactoryGirl.modify do
|
||||
end
|
||||
|
||||
factory :user do
|
||||
confirmation_sent_at '1970-01-01 00:00:00'
|
||||
confirmed_at '1970-01-01 00:00:01'
|
||||
|
||||
after(:create) do |user|
|
||||
user.spree_roles.clear # Remove admin role
|
||||
end
|
||||
end
|
||||
|
||||
factory :admin_user do
|
||||
confirmation_sent_at '1970-01-01 00:00:00'
|
||||
confirmed_at '1970-01-01 00:00:01'
|
||||
|
||||
after(:create) do |user|
|
||||
user.spree_roles << Spree::Role.find_or_create_by_name!('admin')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user