diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-29 03:09:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-29 03:09:37 +0300 |
commit | 937f82e11fe1d3970ea3e1f281185e91d8f5102e (patch) | |
tree | 9c69e19144f2f9d7d5119496f468aea4f1538137 /spec/features/invites_spec.rb | |
parent | 583fadea8d738850cbd83dcde1118d3fc3462d61 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/invites_spec.rb')
-rw-r--r-- | spec/features/invites_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/features/invites_spec.rb b/spec/features/invites_spec.rb index d91fae5cdfd..c0f453206a8 100644 --- a/spec/features/invites_spec.rb +++ b/spec/features/invites_spec.rb @@ -63,6 +63,8 @@ RSpec.describe 'Invites', :aggregate_failures do it 'shows message user already a member' do visit invite_path(group_invite.raw_invite_token) + + expect(page).to have_link(owner.name, href: user_url(owner)) expect(page).to have_content('However, you are already a member of this group.') end end @@ -197,8 +199,10 @@ RSpec.describe 'Invites', :aggregate_failures do it 'declines application and redirects to dashboard' do page.click_link 'Decline' + expect(current_path).to eq(dashboard_projects_path) expect(page).to have_content('You have declined the invitation to join group Owned.') + expect { group_invite.reload }.to raise_error ActiveRecord::RecordNotFound end end @@ -209,7 +213,9 @@ RSpec.describe 'Invites', :aggregate_failures do it 'declines application and redirects to sign in page' do expect(current_path).to eq(new_user_session_path) + expect(page).to have_content('You have declined the invitation to join group Owned.') + expect { group_invite.reload }.to raise_error ActiveRecord::RecordNotFound end end end @@ -223,9 +229,13 @@ RSpec.describe 'Invites', :aggregate_failures do end it 'grants access and redirects to group page' do + expect(group.users.include?(user)).to be false + page.click_link 'Accept invitation' + expect(current_path).to eq(group_path(group)) expect(page).to have_content('You have been granted Owner access to group Owned.') + expect(group.users.include?(user)).to be true end end end |