mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
refactor(spec/system/admin/subscriptions_spec.rb): issue #7483
Add context on third page and adding a product AND deleting the existing product AND adding a new product and click next button.
This commit is contained in:
@@ -390,6 +390,17 @@ describe 'Subscriptions' do
|
||||
expect(page).to have_selector 'td.total', text: "$23.25"
|
||||
end
|
||||
end
|
||||
|
||||
context 'and click next button' do
|
||||
before { click_button('Next') }
|
||||
|
||||
it 'has current path as admin_subscriptions_path and counts by one subscription' do
|
||||
expect{
|
||||
click_button('Create Subscription')
|
||||
expect(page).to have_current_path admin_subscriptions_path
|
||||
}.to change(Subscription, :count).by(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user