diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-01-30 02:01:53 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-05 18:58:19 +0100 |
commit | 9be519c199b01d4b4b1c69ec4d74a1e99345eb47 (patch) | |
tree | 117f601dda66d48671a3e83b7ed93f8a00c72805 /spec/controllers | |
parent | b48d8c8ad0bb2874db6b4c9accb3bebd19e9f2c8 (diff) | |
download | gitlab-ce-9be519c199b01d4b4b1c69ec4d74a1e99345eb47.tar.gz |
Add VariableSerializer for Ci::Variable
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/variables_controller_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/controllers/projects/variables_controller_spec.rb b/spec/controllers/projects/variables_controller_spec.rb index ddba6cd83f4..8e5d6023b79 100644 --- a/spec/controllers/projects/variables_controller_spec.rb +++ b/spec/controllers/projects/variables_controller_spec.rb @@ -24,7 +24,7 @@ describe Projects::VariablesController do it 'renders the ci_variable as json' do subject - expect(response.body).to include(variable.to_json) + expect(response).to match_response_schema('variable') end end @@ -91,7 +91,7 @@ describe Projects::VariablesController do it 'has all variables in response' do subject - expect(response.body).to include(project.variables.reload.to_json) + expect(response).to match_response_schema('variable') end end @@ -120,7 +120,7 @@ describe Projects::VariablesController do it 'has all variables in response' do subject - expect(response.body).to include(project.variables.reload.to_json) + expect(json_response['variables'].count).to eq(0) end end end |