Commit c1d3ce94 authored by Justin Ho's avatar Justin Ho

Fix spec name and refactor controller code

We can include IntegrationsHelper in the shared
IntegrationsActions to make the admin / group controllers
cleaner.
parent f05a9968
......@@ -2,7 +2,6 @@
class Admin::IntegrationsController < Admin::ApplicationController
include IntegrationsActions
include IntegrationsHelper
before_action :not_found, unless: -> { instance_level_integrations? }
......
......@@ -5,6 +5,7 @@ module IntegrationsActions
included do
include Integrations::Params
include IntegrationsHelper
before_action :integration, only: [:edit, :update, :overrides, :test]
end
......
......@@ -4,7 +4,6 @@ module Groups
module Settings
class IntegrationsController < Groups::ApplicationController
include IntegrationsActions
include IntegrationsHelper
before_action :authorize_admin_group!
......
......@@ -108,7 +108,7 @@ RSpec.describe Admin::IntegrationsController do
get :overrides, params: { id: instance_integration.class.to_param }, format: format
end
context 'when format is HTML' do
context 'when format is JSON' do
let(:format) { :json }
include_context 'JSON response'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment