diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-24 04:47:21 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-24 04:47:21 +0300 |
commit | f70a6f3dcaf24d1f70359d4d011294573bc549c1 (patch) | |
tree | abd15e2e16ea8b5960aa55691ef548ed9db27547 /spec | |
parent | 4b7164295f938e9cc9e908664955bc461177c840 (diff) | |
parent | 73f6218ec4f3cf9e403880990565673b730666d9 (diff) |
Merge branch 'move-admin-abuse-report-spinach-test-to-rspec' into 'master'
Move admin abuse report spinach test to RSpec
https://gitlab.com/gitlab-org/gitlab-ce/issues/23036
See merge request !7691
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/admin/admin_abuse_reports_spec.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/spec/features/admin/admin_abuse_reports_spec.rb b/spec/features/admin/admin_abuse_reports_spec.rb index c1731e6414a..7fcfe5a54c7 100644 --- a/spec/features/admin/admin_abuse_reports_spec.rb +++ b/spec/features/admin/admin_abuse_reports_spec.rb @@ -4,17 +4,21 @@ describe "Admin::AbuseReports", feature: true, js: true do let(:user) { create(:user) } context 'as an admin' do + before do + login_as :admin + end + describe 'if a user has been reported for abuse' do - before do - create(:abuse_report, user: user) - login_as :admin - end + let!(:abuse_report) { create(:abuse_report, user: user) } describe 'in the abuse report view' do - it "presents a link to the user's profile" do + it 'presents information about abuse report' do visit admin_abuse_reports_path - expect(page).to have_link user.name, href: user_path(user) + expect(page).to have_content('Abuse Reports') + expect(page).to have_content(abuse_report.message) + expect(page).to have_link(user.name, href: user_path(user)) + expect(page).to have_link('Remove user') end end |