From fc011f1d3f9fb992ecf497d72442b2e62578e37e Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Mon, 8 Jan 2024 10:26:59 +0000 Subject: [PATCH] feat: test home/start paths explicitly --- spec/requests/start_controller_spec.rb | 4 ++-- spec/requests/users_controller_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/requests/start_controller_spec.rb b/spec/requests/start_controller_spec.rb index f24249749..1bfd2b4b9 100644 --- a/spec/requests/start_controller_spec.rb +++ b/spec/requests/start_controller_spec.rb @@ -15,9 +15,9 @@ RSpec.describe StartController, type: :request do describe "GET" do context "when the user is not signed in" do - it "routes user to the start in page" do + it "routes user to the start page" do get "/", headers: headers, params: {} - expect(path).to include("/") + expect(path).to eq("/") expect(page).to have_content("Start now") end end diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index 59d4e27c9..38458eb7f 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -76,7 +76,7 @@ RSpec.describe UsersController, type: :request do it "routes user to the home page" do sign_in user get "/", headers:, params: {} - expect(path).to include("/") + expect(path).to eq("/") expect(page).to have_content("Welcome back") expected_link = "" expect(CGI.unescape_html(response.body)).to include(expected_link) @@ -2027,7 +2027,7 @@ RSpec.describe UsersController, type: :request do it "routes user to the home page" do get "/", headers:, params: {} - expect(path).to include("/") + expect(path).to eq("/") expect(page).to have_content("Welcome back") expected_link = "" expect(CGI.unescape_html(response.body)).to include(expected_link)