2015-10-11 17:41:23 +08:00
|
|
|
require 'rails_helper'
|
2015-02-11 00:18:16 +08:00
|
|
|
|
|
|
|
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
|
2017-08-31 12:06:56 +08:00
|
|
|
get :index, format: :json
|
2018-06-07 16:11:09 +08:00
|
|
|
expect(response.status).to eq(200)
|
2015-04-25 23:18:35 +08:00
|
|
|
expect(::JSON.parse(response.body).has_key?('plugins')).to eq(true)
|
2015-02-11 00:18:16 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|