diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-11-03 08:40:00 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-11-03 08:40:00 +0000 |
commit | 354256d04c704209d65d21c967d947aa577f6a20 (patch) | |
tree | 0000c1c17f9c57cafea176421d8007a66914ca4a /spec/services | |
parent | d51ad1ea6407d3cb9eafd9fc891c7348b10b108f (diff) | |
parent | 9cb9a86f37e89ad181a6a4d024240752c50606c9 (diff) | |
download | gitlab-ce-354256d04c704209d65d21c967d947aa577f6a20.tar.gz |
Merge branch 'refactor-services-for-audit-events-ce' into 'master'
[CE] Refactor controller calls into services
Closes gitlab-ee#3544
See merge request gitlab-org/gitlab-ce!15023
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/applications/create_service_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/services/applications/create_service_spec.rb b/spec/services/applications/create_service_spec.rb new file mode 100644 index 00000000000..47a2a9d6403 --- /dev/null +++ b/spec/services/applications/create_service_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +describe ::Applications::CreateService do + let(:user) { create(:user) } + let(:params) { attributes_for(:application) } + let(:request) { ActionController::TestRequest.new(remote_ip: '127.0.0.1') } + + subject { described_class.new(user, params) } + + it 'creates an application' do + expect { subject.execute(request) }.to change { Doorkeeper::Application.count }.by(1) + end +end |