mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Merge pull request #7265 from andrewpbrett/freeze-adjustments
Don't allow edits to adjustments for canceled orders
This commit is contained in:
@@ -87,4 +87,18 @@ feature '
|
||||
expect(page).to have_selector 'td.amount', text: '110'
|
||||
expect(page).to have_selector 'td.included-tax', text: '10'
|
||||
end
|
||||
|
||||
scenario "viewing adjustments on a canceled order" do
|
||||
# Given a taxed adjustment
|
||||
adjustment = create(:adjustment, label: "Extra Adjustment", adjustable: order,
|
||||
amount: 110, included_tax: 10, order: order)
|
||||
order.cancel!
|
||||
|
||||
login_as_admin_and_visit spree.edit_admin_order_path(order)
|
||||
|
||||
click_link 'Adjustments'
|
||||
|
||||
expect(page).to_not have_selector('tr a.icon-edit')
|
||||
expect(page).to_not have_selector('a.icon-plus'), text: I18n.t(:new_adjustment)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user