This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/spec/controllers/admin/screened_emails_controller_spec.rb
2016-03-31 17:40:54 -04:00

22 lines
463 B
Ruby

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