2016-11-22 04:32:48 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
feature 'Abuse reports', feature: true do
|
|
|
|
let(:another_user) { create(:user) }
|
|
|
|
|
|
|
|
before do
|
2017-06-05 14:44:29 -04:00
|
|
|
gitlab_sign_in :user
|
2016-11-22 04:32:48 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
scenario 'Report abuse' do
|
|
|
|
visit user_path(another_user)
|
|
|
|
|
|
|
|
click_link 'Report abuse'
|
|
|
|
|
2017-06-27 16:43:02 -04:00
|
|
|
fill_in 'abuse_report_message', with: 'This user sends spam'
|
2016-11-22 04:32:48 -05: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
|