Skip to content

Commit

Permalink
Spec coverage: Test calculate_eligibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mamhoff committed Feb 28, 2024
1 parent 4dccae1 commit 679f6b6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions legacy_promotions/spec/models/spree/adjustment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,20 @@
end
end
end

describe "#calculate_eligibility" do
subject { adjustment.calculate_eligibility }

around do |example|
Spree.deprecator.silence do
example.run
end
end

context "when the adjustment is not a promotion adjustment" do
let(:adjustment) { build(:adjustment, eligible: true, source: nil) }

it { is_expected.to eq true }
end
end
end

0 comments on commit 679f6b6

Please sign in to comment.