2016-11-22 04:32:48 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-06-29 00:13:10 -04:00
|
|
|
feature 'Abuse reports' do
|
2016-11-22 04:32:48 -05:00
|
|
|
let(:another_user) { create(:user) }
|
|
|
|
|
|
|
|
before do
|
2017-06-21 19:44:10 -04:00
|
|
|
sign_in(create(: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
|