forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove deprecated mails_from preference
Please, use Spree::Store#mail_from_address now. Ref solidusio#4712
- Loading branch information
Showing
2 changed files
with
0 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,20 +207,6 @@ def allow_promotions_any_match_policy=(value) | |
# entity expansion attacks. | ||
preference :log_entry_allow_aliases, :boolean, default: true | ||
|
||
# @!attribute [rw] mails_from | ||
# @return [String] Email address used as +From:+ field in transactional emails. | ||
# @deprecated Spree::Store#mail_from_address is used instead | ||
preference :mails_from, :string, default: '[email protected]' | ||
def mails_from=(value) | ||
Spree::Deprecation.warn(<<~MSG) && preferences[:mail_from] = value | ||
Solidus doesn't use `Spree::Config.mails_from` preference and it'll | ||
removed on the next major release. Please, remove its definition in | ||
`config/initializers/spree.rb`. Use the `Spree::Store#mail_from_address` | ||
attribute for the default email address used as the 'From:' field in | ||
transactional emails. | ||
MSG | ||
end | ||
|
||
# @!attribute [rw] max_level_in_taxons_menu | ||
# @return [Integer] maximum nesting level in taxons menu (default: +1+) | ||
preference :max_level_in_taxons_menu, :integer, default: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,20 +161,4 @@ class DummyClass; end; | |
it 'has default Event adapter' do | ||
expect(prefs.events.adapter).to eq Spree::Event::Adapters::ActiveSupportNotifications | ||
end | ||
|
||
context 'mails_from' do | ||
it 'is deprecated' do | ||
expect(Spree::Deprecation).to receive(:warn).with(/Solidus doesn't use `Spree::Config.mails_from`/) | ||
|
||
prefs.mails_from=('[email protected]') | ||
end | ||
|
||
it "still sets the value so that consumers aren't broken" do | ||
Spree::Deprecation.silence do | ||
prefs.mails_from=('[email protected]') | ||
end | ||
|
||
expect(prefs.mails_from).to eq('[email protected]') | ||
end | ||
end | ||
end |