diff options
Diffstat (limited to 'spec/features/projects/show/redirects_spec.rb')
-rw-r--r-- | spec/features/projects/show/redirects_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/features/projects/show/redirects_spec.rb b/spec/features/projects/show/redirects_spec.rb index 3ac82244ded..55069cdd6c5 100644 --- a/spec/features/projects/show/redirects_spec.rb +++ b/spec/features/projects/show/redirects_spec.rb @@ -22,13 +22,13 @@ RSpec.describe 'Projects > Show > Redirects' do it 'redirects to sign in page when project is private' do visit project_path(private_project) - expect(current_path).to eq(new_user_session_path) + expect(page).to have_current_path(new_user_session_path, ignore_query: true) end it 'redirects to sign in page when project does not exist' do visit project_path(build(:project, :public)) - expect(current_path).to eq(new_user_session_path) + expect(page).to have_current_path(new_user_session_path, ignore_query: true) end it 'redirects to public project page after signing in' do @@ -41,7 +41,7 @@ RSpec.describe 'Projects > Show > Redirects' do click_button 'Sign in' expect(status_code).to eq(200) - expect(current_path).to eq("/#{public_project.full_path}") + expect(page).to have_current_path("/#{public_project.full_path}", ignore_query: true) end it 'redirects to private project page after sign in' do @@ -53,7 +53,7 @@ RSpec.describe 'Projects > Show > Redirects' do click_button 'Sign in' expect(status_code).to eq(200) - expect(current_path).to eq("/#{private_project.full_path}") + expect(page).to have_current_path("/#{private_project.full_path}", ignore_query: true) end context 'when signed in' do |