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

27 lines
529 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe '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
2021-02-22 17:27:13 +05:30
it 'report abuse' do
2017-08-17 22:00:37 +05:30
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