mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Adds test to check permissions when updating a product
This commit is contained in:
committed by
zanetagebka
parent
42634c68ef
commit
2ef5cab3c2
@@ -1457,6 +1457,18 @@ RSpec.describe 'As an enterprise user, I can manage my products', feature: :admi
|
||||
expect(page).to have_content "Changes saved"
|
||||
expect(page).to have_selector row_containing_name("Pommes")
|
||||
end
|
||||
|
||||
it "allows me to update a product" do
|
||||
visit spree.admin_products_path
|
||||
|
||||
within row_containing_name(product_supplied.name) do
|
||||
fill_in "Name", with: "Pommes"
|
||||
end
|
||||
click_button "Save changes"
|
||||
|
||||
expect(page).to have_content "Changes saved"
|
||||
expect(page).to have_selector row_containing_name("Pommes")
|
||||
end
|
||||
end
|
||||
|
||||
def create_products(amount)
|
||||
|
||||
Reference in New Issue
Block a user