Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spree 2 Upgrade] Fix references to MailMethod in specs #2020

Closed
sauloperez opened this issue Dec 21, 2017 · 3 comments
Closed

[Spree 2 Upgrade] Fix references to MailMethod in specs #2020

sauloperez opened this issue Dec 21, 2017 · 3 comments
Assignees

Comments

@sauloperez
Copy link
Contributor

sauloperez commented Dec 21, 2017

What

We need to get rid of the creation of Spree::MailMethod in all specs and use Spree::Config[:mails_from] instead.

So in https://github.com/openfoodfoundation/openfoodnetwork/blob/master/spec/controllers/spree/orders_controller_spec.rb#L401 we would turn:

Spree::MailMethod.create!(
  environment: Rails.env,
  preferred_mails_from: '[email protected]'
)

into:

Spree::Config[:mails_from] = "[email protected]"
@sauloperez sauloperez self-assigned this Mar 7, 2018
@sauloperez
Copy link
Contributor Author

sauloperez commented Mar 19, 2018

This is not yet doable as it depends on https://github.com/spree/spree/pull/2643/files#diff-a428b7a87ba7179c65fcb97529aa2452R10 from Spree. Until we don't reach that commit our efforts are pointless.

@luisramos0
Copy link
Contributor

I just looked at spree 2 branch and I believe we do have this already and this is now doable and it is not blocked.

@luisramos0 luisramos0 changed the title Fix references to MailMethod in specs [Spree 2 Upgrade] Fix references to MailMethod in specs Aug 23, 2018
@luisramos0
Copy link
Contributor

Specs referencing MailMethod in spree 2-0-4-stable branch:
spec/controllers/admin/subscriptions_controller_spec.rb
spec/controllers/spree/admin/orders_controller_spec.rb
spec/controllers/spree/orders_controller_spec.rb
spec/controllers/user_passwords_controller_spec.rb
spec/features/consumer/shopping/orders_spec.rb
spec/jobs/subscription_confirm_job_spec.rb
spec/mailers/enterprise_mailer_spec.rb
spec/mailers/producer_mailer_spec.rb
spec/mailers/user_mailer_spec.rb
spec/models/order_cycle_spec.rb
spec/models/spree/order_spec.rb
spec/services/create_mail_method_spec.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants