2016-11-22 09:32:48 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
feature 'Abuse reports', feature: true do
|
|
|
|
let(:another_user) { create(:user) }
|
|
|
|
|
|
|
|
before do
|
2017-06-05 18:44:29 +00:00
|
|
|
gitlab_sign_in :user
|
2016-11-22 09:32:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
scenario 'Report abuse' do
|
|
|
|
visit user_path(another_user)
|
|
|
|
|
|
|
|
click_link 'Report abuse'
|
|
|
|
|
2017-06-27 20:43:02 +00:00
|
|
|
fill_in 'abuse_report_message', with: 'This user sends spam'
|
2016-11-22 09:32:48 +00:00
|
|
|
click_button 'Send report'
|
|
|
|
|
|
|
|
expect(page).to have_content 'Thank you for your report'
|
|
|
|
|
|
|
|
visit user_path(another_user)
|
|
|
|
|
|
|
|
expect(page).to have_button("Already reported for abuse")
|
|
|
|
end
|
|
|
|
end
|