gitlab-org--gitlab-foss/spec/features/abuse_report_spec.rb

25 lines
492 B
Ruby
Raw Normal View History

require 'spec_helper'
2018-07-05 02:32:05 -04:00
describe 'Abuse reports' do
let(:another_user) { create(:user) }
before do
sign_in(create(:user))
end
2018-07-05 02:32:05 -04:00
it 'Report abuse' do
visit user_path(another_user)
click_link 'Report abuse'
fill_in 'abuse_report_message', with: 'This user sends spam'
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