debian-mirror-gitlab/spec/features/abuse_report_spec.rb

25 lines
497 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
require 'spec_helper'
2017-09-10 17:25:29 +05:30
feature 'Abuse reports' do
2017-08-17 22:00:37 +05:30
let(:another_user) { create(:user) }
before do
2017-09-10 17:25:29 +05:30
sign_in(create(:user))
2017-08-17 22:00:37 +05:30
end
scenario 'Report abuse' do
visit user_path(another_user)
click_link 'Report abuse'
2017-09-10 17:25:29 +05:30
fill_in 'abuse_report_message', with: 'This user sends spam'
2017-08-17 22:00:37 +05:30
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