Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/invites_spec.rb')
-rw-r--r--spec/features/invites_spec.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/features/invites_spec.rb b/spec/features/invites_spec.rb
index 9cb9416e7a0..965e97baadd 100644
--- a/spec/features/invites_spec.rb
+++ b/spec/features/invites_spec.rb
@@ -57,7 +57,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
end
it 'renders sign up page with sign up notice' do
- expect(current_path).to eq(new_user_registration_path)
+ expect(page).to have_current_path(new_user_registration_path, ignore_query: true)
expect(page).to have_content('To accept this invitation, create an account or sign in')
end
@@ -85,7 +85,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
fill_in_sign_in_form(user)
- expect(current_path).to eq(activity_group_path(group))
+ expect(page).to have_current_path(activity_group_path(group), ignore_query: true)
end
end
@@ -98,7 +98,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
end
it 'shows message user already a member' do
- expect(current_path).to eq(invite_path(group_invite.raw_invite_token))
+ expect(page).to have_current_path(invite_path(group_invite.raw_invite_token), ignore_query: true)
expect(page).to have_link(user.name, href: user_path(user))
expect(page).to have_content('You are already a member of this group.')
end
@@ -127,7 +127,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
end
it 'declines application and redirects to dashboard' do
- expect(current_path).to eq(dashboard_projects_path)
+ expect(page).to have_current_path(dashboard_projects_path, ignore_query: true)
expect(page).to have_content('You have declined the invitation to join group Owned.')
expect { group_invite.reload }.to raise_error ActiveRecord::RecordNotFound
end
@@ -139,7 +139,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
end
it 'declines application and redirects to sign in page' do
- expect(current_path).to eq(decline_invite_path(group_invite.raw_invite_token))
+ expect(page).to have_current_path(decline_invite_path(group_invite.raw_invite_token), ignore_query: true)
expect(page).not_to have_content('You have declined the invitation to join')
expect(page).to have_content('You successfully declined the invitation')
expect { group_invite.reload }.to raise_error ActiveRecord::RecordNotFound
@@ -174,7 +174,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
it 'does not sign the user in' do
fill_in_sign_up_form(new_user)
- expect(current_path).to eq(new_user_session_path)
+ expect(page).to have_current_path(new_user_session_path, ignore_query: true)
expect(page).to have_content('You have signed up successfully. However, we could not sign you in because your account is awaiting approval from your GitLab administrator')
end
end
@@ -186,7 +186,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
fill_in_sign_up_form(new_user)
fill_in_welcome_form
- expect(current_path).to eq(activity_group_path(group))
+ expect(page).to have_current_path(activity_group_path(group), ignore_query: true)
expect(page).to have_content('You have been granted Owner access to group Owned.')
end
@@ -197,7 +197,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
fill_in_sign_up_form(new_user)
fill_in_welcome_form
- expect(current_path).to eq(activity_group_path(group))
+ expect(page).to have_current_path(activity_group_path(group), ignore_query: true)
end
end
end
@@ -209,7 +209,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
it 'fails sign up and redirects back to sign up', :aggregate_failures do
expect { fill_in_sign_up_form(new_user) }.not_to change { User.count }
expect(page).to have_content('prohibited this user from being saved')
- expect(current_path).to eq(user_registration_path)
+ expect(page).to have_current_path(user_registration_path, ignore_query: true)
end
end
@@ -230,7 +230,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
fill_in_sign_up_form(new_user)
fill_in_welcome_form
- expect(current_path).to eq(activity_group_path(group))
+ expect(page).to have_current_path(activity_group_path(group), ignore_query: true)
end
context 'the user sign-up using a different email address' do
@@ -248,7 +248,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
fill_in_sign_in_form(new_user)
fill_in_welcome_form
- expect(current_path).to eq(activity_group_path(group))
+ expect(page).to have_current_path(activity_group_path(group), ignore_query: true)
end
end
@@ -262,7 +262,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
fill_in_sign_up_form(new_user)
fill_in_welcome_form
- expect(current_path).to eq(activity_group_path(group))
+ expect(page).to have_current_path(activity_group_path(group), ignore_query: true)
end
end
end
@@ -273,11 +273,11 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
it 'lands on sign up page and then registers' do
visit invite_path(group_invite.raw_invite_token)
- expect(current_path).to eq(new_user_registration_path)
+ expect(page).to have_current_path(new_user_registration_path, ignore_query: true)
fill_in_sign_up_form(new_user, 'Register')
- expect(current_path).to eq(users_sign_up_welcome_path)
+ expect(page).to have_current_path(users_sign_up_welcome_path, ignore_query: true)
end
end
@@ -285,7 +285,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
it 'declines application and shows a decline page' do
visit decline_invite_path(group_invite.raw_invite_token)
- expect(current_path).to eq(decline_invite_path(group_invite.raw_invite_token))
+ expect(page).to have_current_path(decline_invite_path(group_invite.raw_invite_token), ignore_query: true)
expect(page).to have_content('You successfully declined the invitation')
expect { group_invite.reload }.to raise_error ActiveRecord::RecordNotFound
end