2019-10-17 06:07:30 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-11-22 01:14:59 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-16 18:09:01 +00:00
|
|
|
RSpec.describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controller do
|
2016-11-22 01:14:59 +00:00
|
|
|
include JavaScriptFixturesHelpers
|
2020-12-07 12:10:00 +00:00
|
|
|
include AdminModeHelper
|
2016-11-22 01:14:59 +00:00
|
|
|
|
|
|
|
let(:admin) { create(:admin) }
|
|
|
|
let!(:abuse_report) { create(:abuse_report) }
|
|
|
|
let!(:abuse_report_with_short_message) { create(:abuse_report, message: 'SHORT MESSAGE') }
|
|
|
|
let!(:abuse_report_with_long_message) { create(:abuse_report, message: "LONG MESSAGE\n" * 50) }
|
|
|
|
|
|
|
|
render_views
|
|
|
|
|
2017-08-10 22:31:42 +00:00
|
|
|
before do
|
2016-11-22 01:14:59 +00:00
|
|
|
sign_in(admin)
|
2020-12-07 12:10:00 +00:00
|
|
|
enable_admin_mode!(admin)
|
2016-11-22 01:14:59 +00:00
|
|
|
end
|
|
|
|
|
2019-04-21 10:58:07 +00:00
|
|
|
it 'abuse_reports/abuse_reports_list.html' do
|
2016-11-22 01:14:59 +00:00
|
|
|
get :index
|
|
|
|
|
2019-07-17 22:15:53 +00:00
|
|
|
expect(response).to be_successful
|
2016-11-22 01:14:59 +00:00
|
|
|
end
|
|
|
|
end
|