504cbb27c1
Remove the inheritance from ::BaseService which is causing us to inherit the initializer that has project as the first arg, as we will not have access to project with forthcoming group clusters. Also call install service from create service - 1 less thing to re-use Extract TestRequest code into a spec helper. Given that we need different behaviour for Rails 5.0 (and again in Rails 5.1!), it's handy to have that branching behaviour in one place
14 lines
359 B
Ruby
14 lines
359 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "spec_helper"
|
|
|
|
describe ::Applications::CreateService do
|
|
include TestRequestHelpers
|
|
|
|
let(:user) { create(:user) }
|
|
let(:params) { attributes_for(:application) }
|
|
|
|
subject { described_class.new(user, params) }
|
|
|
|
it { expect { subject.execute(test_request) }.to change { Doorkeeper::Application.count }.by(1) }
|
|
end
|