2019-04-29 19:27:42 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-10-11 04:41:23 -05:00
|
|
|
require 'rails_helper'
|
2015-02-10 10:18:16 -06: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
|
2018-06-10 23:33:07 -05:00
|
|
|
before do
|
|
|
|
sign_in(Fabricate(:admin))
|
|
|
|
end
|
2015-02-10 10:18:16 -06:00
|
|
|
|
|
|
|
it 'should return JSON' do
|
2018-06-10 23:33:07 -05:00
|
|
|
get "/admin/plugins.json"
|
2018-06-07 03:11:09 -05:00
|
|
|
expect(response.status).to eq(200)
|
2020-05-07 10:04:12 -05:00
|
|
|
expect(response.parsed_body.has_key?('plugins')).to eq(true)
|
2015-02-10 10:18:16 -06:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|