discourse/spec/controllers/admin/screened_urls_controller_spec.rb
Sam 89ad2b5900 DEV: Rails 5.2 upgrade and global gem upgrade
This updates tests to use latest rails 5 practice
and updates ALL dependencies that could be updated

Performance testing shows that performance has not regressed
if anything it is marginally faster now.
2018-06-07 14:21:33 +10:00

23 lines
471 B
Ruby

require 'rails_helper'
describe Admin::ScreenedUrlsController do
it "is a subclass of AdminController" do
expect(Admin::ScreenedUrlsController < Admin::AdminController).to eq(true)
end
let!(:user) { log_in(:admin) }
context '.index' do
before do
get :index, format: :json
end
subject { response }
it { is_expected.to be_successful }
it 'returns JSON' do
expect(::JSON.parse(subject.body)).to be_a(Array)
end
end
end