Commit 2ee6f60a authored by James Lopez's avatar James Lopez

fix specs

parent 475ab94e
......@@ -28,6 +28,8 @@ describe Admin::ApplicationsController do
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
......
......@@ -28,6 +28,8 @@ describe Oauth::ApplicationsController do
describe 'POST #create' do
it 'logs the audit event' do
stub_licensed_features(extended_audit_events: true)
sign_in(user)
application = build(:oauth_application)
......
......@@ -69,6 +69,8 @@ describe Profiles::KeysController do
describe '#create' do
it 'logs the audit event' do
stub_licensed_features(extended_audit_events: true)
sign_in(user)
key = build(:key)
......
......@@ -7,6 +7,10 @@ describe Emails::CreateService do
subject(:service) { described_class.new(user, user, opts) }
describe '#execute' do
before do
stub_licensed_features(extended_audit_events: true)
end
it 'creates an email with valid attributes' do
expect { service.execute }.to change { Email.count }.by(1)
expect(Email.where(opts)).not_to be_empty
......
......@@ -6,6 +6,10 @@ describe Emails::DestroyService do
subject(:service) { described_class.new(user, user, email: email.email) }
before do
stub_licensed_features(extended_audit_events: true)
end
describe '#execute' do
it 'removes an email' do
expect { service.execute }.to change { user.emails.count }.by(-1)
......
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