summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-08-14 22:31:38 +0100
committerNick Thomas <nick@gitlab.com>2018-08-15 07:38:18 +0100
commitf6f6295027a5040f27a8cbb2b979d16b445a284b (patch)
treeafc085425211da33b44f8e3747314bd97e1583aa /spec/requests
parent40d1fc1cd7180f5ab900ae9cab9fbf1548e35c51 (diff)
downloadgitlab-ce-f6f6295027a5040f27a8cbb2b979d16b445a284b.tar.gz
Convert the license template API to use the new LicenseTemplateFinder
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/templates_spec.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/requests/api/templates_spec.rb b/spec/requests/api/templates_spec.rb
index 6bb53fdc98d..d1e16ab9ca9 100644
--- a/spec/requests/api/templates_spec.rb
+++ b/spec/requests/api/templates_spec.rb
@@ -56,6 +56,8 @@ describe API::Templates do
end
it 'returns a license template' do
+ expect(response).to have_gitlab_http_status(200)
+
expect(json_response['key']).to eq('mit')
expect(json_response['name']).to eq('MIT License')
expect(json_response['nickname']).to be_nil
@@ -181,6 +183,7 @@ describe API::Templates do
it 'replaces the copyright owner placeholder with the name of the current user' do
get api('/templates/licenses/mit', user)
+ expect(response).to have_gitlab_http_status(200)
expect(json_response['content']).to include("Copyright (c) #{Time.now.year} #{user.name}")
end
end