mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-20 04:59:16 +00:00
Adjustments spec, add association test
This commit is contained in:
committed by
Maikel Linke
parent
5064bf5383
commit
58469adfeb
@@ -7,6 +7,19 @@ module Spree
|
||||
let(:order) { build(:order) }
|
||||
let(:adjustment) { Spree::Adjustment.create(label: "Adjustment", amount: 5) }
|
||||
|
||||
describe "associations" do
|
||||
it { is_expected.to have_one(:metadata) }
|
||||
it { is_expected.to have_many(:adjustments) }
|
||||
|
||||
it { is_expected.to belong_to(:adjustable) }
|
||||
|
||||
it { is_expected.to belong_to(:adjustable) }
|
||||
it { is_expected.to belong_to(:originator) }
|
||||
it { is_expected.to belong_to(:order) }
|
||||
it { is_expected.to belong_to(:tax_category) }
|
||||
it { is_expected.to belong_to(:tax_rate) }
|
||||
end
|
||||
|
||||
describe "scopes" do
|
||||
let!(:arbitrary_adjustment) { create(:adjustment, label: "Arbitrary") }
|
||||
let!(:return_authorization_adjustment) {
|
||||
|
||||
Reference in New Issue
Block a user