Skip to content

Commit

Permalink
Add taxation integration spec for clearing address
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Nov 3, 2016
1 parent 351d3bc commit e16e5aa
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions core/spec/models/spree/tax/taxation_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,25 @@
federal_books_tax.destroy!
expect(line_item.adjustments.count).to eq(2)
end

context 'when tax address is later cleared' do
before do
order.ship_address = nil
order.update!
end

it 'removes all tax adjustments' do
aggregate_failures do
expect(line_item.adjustments.tax.count).to eq(0)
expect(line_item).to have_attributes(
price: 20,
total: 20,
included_tax_total: 0,
additional_tax_total: 0
)
end
end
end
end

context 'an order with a book and a shipment' do
Expand Down

0 comments on commit e16e5aa

Please sign in to comment.