mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
This option came from Spree and we never used it. The config input field is disabled in the admin interface and I checked our managed databases. I don't think that we will want this feature in the future either. Staging sends unmodified emails which is more realistic and we haven't had a use case to intercept those emails. There's still the BCC option if we need additional access.
32 lines
1.2 KiB
Ruby
32 lines
1.2 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
require 'spec_helper'
|
|
|
|
describe MailConfiguration do
|
|
describe 'apply!' do
|
|
before do
|
|
allow(Spree::Core::MailSettings).to receive(:init) { true }
|
|
end
|
|
|
|
it 'sets config entries in the Spree Config' do
|
|
allow(Spree::Config).to receive(:[]=)
|
|
|
|
described_class.apply!
|
|
expect(Spree::Config).to have_received(:[]=).with(:mail_host, "example.com")
|
|
expect(Spree::Config).to have_received(:[]=).with(:mail_domain, "example.com")
|
|
expect(Spree::Config).to have_received(:[]=).with(:mail_port, "25")
|
|
expect(Spree::Config).to have_received(:[]=).with(:mail_auth_type, "login")
|
|
expect(Spree::Config).to have_received(:[]=).with(:smtp_username, "ofn")
|
|
expect(Spree::Config).to have_received(:[]=).with(:smtp_password, "f00d")
|
|
expect(Spree::Config).to have_received(:[]=).with(:secure_connection_type, "None")
|
|
expect(Spree::Config).to have_received(:[]=).with(:mails_from, "no-reply@example.com")
|
|
expect(Spree::Config).to have_received(:[]=).with(:mail_bcc, "")
|
|
end
|
|
|
|
it 'initializes the mail settings' do
|
|
described_class.apply!
|
|
expect(Spree::Core::MailSettings).to have_received(:init)
|
|
end
|
|
end
|
|
end
|