Commit 68677bcd authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Move ee-specific parts from Admin::ApplicationsController

parent 16f7bf44
# frozen_string_literal: true
require 'spec_helper'
describe Admin::ApplicationsController do
let(:admin) { create(:admin) }
let(:application) { create(:oauth_application, owner_id: nil, owner_type: nil) }
before do
sign_in(admin)
end
describe 'POST #create' do
it 'creates the application' do
stub_licensed_features(extended_audit_events: true)
create_params = attributes_for(:application, trusted: true)
expect do
post :create, params: { doorkeeper_application: create_params }
end.to change { SecurityEvent.count }.by(1)
end
end
end
...@@ -30,8 +30,6 @@ describe Admin::ApplicationsController do ...@@ -30,8 +30,6 @@ describe Admin::ApplicationsController do
describe 'POST #create' do describe 'POST #create' do
it 'creates the application' do it 'creates the application' do
stub_licensed_features(extended_audit_events: true)
create_params = attributes_for(:application, trusted: true) create_params = attributes_for(:application, trusted: true)
expect do expect do
...@@ -42,7 +40,6 @@ describe Admin::ApplicationsController do ...@@ -42,7 +40,6 @@ describe Admin::ApplicationsController do
expect(response).to redirect_to(admin_application_path(application)) expect(response).to redirect_to(admin_application_path(application))
expect(application).to have_attributes(create_params.except(:uid, :owner_type)) expect(application).to have_attributes(create_params.except(:uid, :owner_type))
expect(SecurityEvent.count).to eq(1)
end end
it 'renders the application form on errors' do it 'renders the application form on errors' do
......
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