diff --git a/spec/features/index_page_spec.rb b/spec/features/index_page_spec.rb index ae65c5fd1..7e0986f33 100644 --- a/spec/features/index_page_spec.rb +++ b/spec/features/index_page_spec.rb @@ -43,14 +43,14 @@ visit admin_customers_path click_on "Edit" - expect(current_path).to eq(edit_admin_customer_path(customer)) + expect(page).to have_current_path(edit_admin_customer_path(customer)) end it "links to the new page" do visit admin_customers_path click_on("New customer") - expect(current_path).to eq(new_admin_customer_path) + expect(page).to have_current_path(new_admin_customer_path) end it "displays translated labels" do diff --git a/spec/features/log_entries_index_spec.rb b/spec/features/log_entries_index_spec.rb index 922db71c3..94d8a5abe 100644 --- a/spec/features/log_entries_index_spec.rb +++ b/spec/features/log_entries_index_spec.rb @@ -38,14 +38,14 @@ visit admin_log_entries_path click_on t("administrate.actions.edit") - expect(current_path).to eq(edit_admin_log_entry_path(log_entry)) + expect(page).to have_current_path(edit_admin_log_entry_path(log_entry)) end scenario "user clicks through to the new page" do visit admin_log_entries_path click_on("New log entry") - expect(current_path).to eq(new_admin_log_entry_path) + expect(page).to have_current_path(new_admin_log_entry_path) end scenario "user deletes record", js: true do diff --git a/spec/features/orders_index_spec.rb b/spec/features/orders_index_spec.rb index 0a1161044..47923a060 100644 --- a/spec/features/orders_index_spec.rb +++ b/spec/features/orders_index_spec.rb @@ -35,14 +35,14 @@ visit admin_orders_path click_on t("administrate.actions.edit") - expect(current_path).to eq(edit_admin_order_path(order)) + expect(page).to have_current_path(edit_admin_order_path(order)) end scenario "user clicks through to the new page" do visit admin_orders_path click_on("New order") - expect(current_path).to eq(new_admin_order_path) + expect(page).to have_current_path(new_admin_order_path) end scenario "user deletes record", js: true do diff --git a/spec/features/products_index_spec.rb b/spec/features/products_index_spec.rb index 5fda03ddf..4c6097ed9 100644 --- a/spec/features/products_index_spec.rb +++ b/spec/features/products_index_spec.rb @@ -19,7 +19,7 @@ expect(page).to have_content(product.name) expect(page).to have_content(product.description) - expect(current_path).to eq(admin_product_path(product)) + expect(page).to have_current_path(admin_product_path(product)) end it "links to the edit page" do @@ -28,14 +28,14 @@ visit admin_products_path click_on "Edit" - expect(current_path).to eq(edit_admin_product_path(product)) + expect(page).to have_current_path(edit_admin_product_path(product)) end it "links to the new page" do visit admin_products_path click_on("New product") - expect(current_path).to eq(new_admin_product_path) + expect(page).to have_current_path(new_admin_product_path) end scenario "product sorted by has_one association" do