Add a spec for the new plugins controller

This commit is contained in:
Robin Ward
2015-02-10 11:18:16 -05:00
parent 0ce6524153
commit 8d46de4819
4 changed files with 28 additions and 12 deletions

View File

@ -0,0 +1,20 @@
require 'spec_helper'
describe Admin::PluginsController do
it "is a subclass of AdminController" do
expect(Admin::PluginsController < Admin::AdminController).to eq(true)
end
context "while logged in as an admin" do
let!(:admin) { log_in(:admin) }
it 'should return JSON' do
xhr :get, :index
response.should be_success
::JSON.parse(response.body).has_key?('plugins').should == true
end
end
end