summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-10-24 09:38:06 +0300
committerJames Lopez <james@jameslopez.es>2017-10-31 09:03:59 +0100
commit72b7b10d52de1b150b124c017427b2802b4193e6 (patch)
tree8f38106c35e4379cc466caca7b40411749fc829c /spec/services
parentbba020a56cbedd6403b637ec7f9eaee258eb7c67 (diff)
downloadgitlab-ce-72b7b10d52de1b150b124c017427b2802b4193e6.tar.gz
add applications controller logic
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/applications/create_service_spec.rb12
1 files changed, 12 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..0bd96a605c0
--- /dev/null
+++ b/spec/services/applications/create_service_spec.rb
@@ -0,0 +1,12 @@
+require 'spec_helper'
+
+describe ::Applications::CreateService do
+ let(:user) { create(:user) }
+ let(:params) { attributes_for(:application) }
+
+ subject { described_class.new(user, params) }
+
+ it 'creates an application' do
+ expect { subject.execute }.to change { Doorkeeper::Application.count }.by(1)
+ end
+end