Enforce RSpec expect(..).not_to over to_not

This commit is contained in:
Maikel Linke
2024-03-07 16:57:54 +11:00
parent b4385623b2
commit bd6b0ddbf3
163 changed files with 616 additions and 613 deletions

View File

@@ -371,7 +371,7 @@ describe 'Subscriptions' do
expect{
click_button('Create Subscription')
expect(page).to have_content 'Please add at least one product'
}.to_not change { Subscription.count }
}.not_to change { Subscription.count }
end
context 'and adding a new product' do

View File

@@ -33,7 +33,7 @@ describe 'Subscriptions' do
expect(page).to have_content "Just a few more steps before you can begin"
# subscriptions are enabled, instructions are not displayed
expect(page).to_not have_content 'Under "Shop Preferences", /
expect(page).not_to have_content 'Under "Shop Preferences", /
enable the Subscriptions option'
# other relevant instructions are displayed
@@ -54,7 +54,7 @@ describe 'Subscriptions' do
end
it "the subscriptions tab is not visible" do
expect(page).to have_current_path "/admin/orders"
expect(page).to_not have_link "Subscriptions", href: "/admin/subscriptions"
expect(page).not_to have_link "Subscriptions", href: "/admin/subscriptions"
end
end
end