Skip to content

Commit

Permalink
Add spec coverage for shipment adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
mamhoff committed Jun 20, 2024
1 parent 2a16573 commit 5955fb2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions admin/spec/features/orders/adjustments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,25 @@
expect(page).to be_axe_clean
end
end

context "with a shipment being adjusted" do
let(:order) { create(:order_with_line_items, number: "R123456789") }

before do
order.shipments.first.adjustments.create!(
order: order,
label: "Manual shipping discount",
amount: -2,
source: nil
)
end

it "can display a shipment adjustment" do
visit "/admin/orders/R123456789"

click_on "Adjustments"
expect(page).to have_content("Manual shipping discount")
expect(page).to be_axe_clean
end
end
end

0 comments on commit 5955fb2

Please sign in to comment.