jam-cloud/web/spec/controllers/api_app_features_controller...

22 lines
516 B
Ruby

require 'spec_helper'
describe ApiAppFeaturesController, type: :controller do
render_views
let(:user) { FactoryBot.create(:user) }
before(:each) do
controller.current_user = user
end
describe "index" do
it "returns app features of env" do
FactoryBot.create(:app_feature, env: 'production')
get :index, params: { env: 'production' }
response.should be_successful
json = JSON.parse(response.body, :symbolize_names => true)
json.should have(1).item
end
end
end