2019-10-17 02:07:30 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-11-21 20:14:59 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controller do
|
|
|
|
include JavaScriptFixturesHelpers
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
before(:all) do
|
|
|
|
clean_frontend_fixtures('abuse_reports/')
|
|
|
|
end
|
|
|
|
|
2017-08-10 18:31:42 -04:00
|
|
|
before do
|
2016-11-21 20:14:59 -05:00
|
|
|
sign_in(admin)
|
|
|
|
end
|
|
|
|
|
2019-04-21 06:58:07 -04:00
|
|
|
it 'abuse_reports/abuse_reports_list.html' do
|
2016-11-21 20:14:59 -05:00
|
|
|
get :index
|
|
|
|
|
2019-07-17 18:15:53 -04:00
|
|
|
expect(response).to be_successful
|
2016-11-21 20:14:59 -05:00
|
|
|
end
|
|
|
|
end
|