summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/fixtures/api/schemas/entities/license_information.json4
-rw-r--r--spec/requests/api/projects_spec.rb4
2 files changed, 5 insertions, 3 deletions
diff --git a/spec/fixtures/api/schemas/entities/license_information.json b/spec/fixtures/api/schemas/entities/license_information.json
new file mode 100644
index 00000000000..2f8292eafdb
--- /dev/null
+++ b/spec/fixtures/api/schemas/entities/license_information.json
@@ -0,0 +1,4 @@
+{
+ "name": "MIT License",
+ "spdx_id": "MIT"
+} \ No newline at end of file
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index 4e505bcca84..9ae7eb453b9 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -1026,9 +1026,7 @@ describe API::Projects do
get api("/projects/#{project.id}", user)
expect(response).to have_http_status(200)
- expect(json_response['license']).to be_a Hash
- expect(json_response['license']['name']).to be_present
- expect(json_response['license']['spdx_id']).to be_present
+ expect(json_response['license']).to match_schema('entities/license_information')
end
it 'returns nil if no license' do