summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/api/deploy_keys.rb1
-rw-r--r--spec/lib/gitlab/ci/config/entry/key_spec.rb4
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb
index a92f17937b8..b0b7b50998f 100644
--- a/lib/api/deploy_keys.rb
+++ b/lib/api/deploy_keys.rb
@@ -116,6 +116,7 @@ module API
result = deploy_keys_project.update_attributes(can_push: can_push,
deploy_key_attributes: { id: params[:key_id],
title: title })
+
if result
present deploy_keys_project, with: Entities::DeployKeysProject
else
diff --git a/spec/lib/gitlab/ci/config/entry/key_spec.rb b/spec/lib/gitlab/ci/config/entry/key_spec.rb
index 846f5f44470..3cbf19bea8b 100644
--- a/spec/lib/gitlab/ci/config/entry/key_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/key_spec.rb
@@ -10,7 +10,7 @@ describe Gitlab::Ci::Config::Entry::Key do
end
it 'reports errors with config value' do
- expect(entry.errors).to include 'key config cannot contain the "/" character'
+ expect(entry.errors).to include 'key config cannot contain the "/" character'
end
end
@@ -20,7 +20,7 @@ describe Gitlab::Ci::Config::Entry::Key do
end
it 'reports errors with config value' do
- expect(entry.errors).to include 'key config cannot be "." or ".."'
+ expect(entry.errors).to include 'key config cannot be "." or ".."'
end
end