mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
18 lines
468 B
Ruby
18 lines
468 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe Spree::Admin::TaxSettingsController do
|
|
describe "#update" do
|
|
let(:params) { { preferences: { products_require_tax_category: "1" } } }
|
|
|
|
before do
|
|
allow(controller).to receive(:spree_current_user) { create(:admin_user) }
|
|
end
|
|
|
|
it "changes Tax settings" do
|
|
expect {
|
|
spree_post :update, params
|
|
}.to change { Spree::Config[:products_require_tax_category] }.to(true)
|
|
end
|
|
end
|
|
end
|