mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #2117 from coopdevs/confirm-example-user
Automatically confirm the spree@example.com user
This commit is contained in:
@@ -9,9 +9,11 @@ namespace :openfoodnetwork do
|
||||
require_relative '../../spec/support/spree/init'
|
||||
task_name = "openfoodnetwork:dev:load_sample_data"
|
||||
|
||||
spree_user = Spree::User.find_by_email('spree@example.com')
|
||||
|
||||
Spree::MailMethod.create!(
|
||||
environment: Rails.env,
|
||||
preferred_mails_from: 'spree@example.com'
|
||||
preferred_mails_from: spree_user.email
|
||||
)
|
||||
|
||||
# -- Shipping / payment information
|
||||
@@ -193,6 +195,8 @@ namespace :openfoodnetwork do
|
||||
CreateOrderCycle.new(enterprise2, variants).call
|
||||
|
||||
EnterpriseRole.create!(user: Spree::User.first, enterprise: enterprise2)
|
||||
|
||||
spree_user.confirm!
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user