diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-01-23 19:53:29 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-05 18:58:18 +0100 |
commit | 2592aec9e3a7a1b0d2689dd14cc6e0b9cea068cd (patch) | |
tree | c44982b936f73837c0277e7f45b53895bfac0b0f /spec/controllers/projects/variables_controller_spec.rb | |
parent | dcc23530bd1e2bd1600bd523c90c040f84f8c354 (diff) | |
download | gitlab-ce-2592aec9e3a7a1b0d2689dd14cc6e0b9cea068cd.tar.gz |
Use all parameters in VariablesController specs
Diffstat (limited to 'spec/controllers/projects/variables_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/variables_controller_spec.rb | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/spec/controllers/projects/variables_controller_spec.rb b/spec/controllers/projects/variables_controller_spec.rb index 4cbc2fb443a..ac5c453a8ab 100644 --- a/spec/controllers/projects/variables_controller_spec.rb +++ b/spec/controllers/projects/variables_controller_spec.rb @@ -20,8 +20,11 @@ describe Projects::VariablesController do subject do post :save_multiple, namespace_id: project.namespace.to_param, project_id: project, - variables_attributes: [{ id: variable.id, key: variable.key, value: 'other_value' }, - { key: '..?', value: 'dummy_value' }], + variables_attributes: [{ id: variable.id, key: variable.key, + value: 'other_value', + protected: variable.protected?.to_s }, + { key: '..?', value: 'dummy_value', + protected: 'false' }], format: :json end @@ -44,8 +47,11 @@ describe Projects::VariablesController do subject do post :save_multiple, namespace_id: project.namespace.to_param, project_id: project, - variables_attributes: [{ id: variable.id, key: variable.key, value: 'other_value' }, - { key: 'new_key', value: 'dummy_value' }], + variables_attributes: [{ id: variable.id, key: variable.key, + value: 'other_value', + protected: variable.protected?.to_s }, + { key: 'new_key', value: 'dummy_value', + protected: 'false' }], format: :json end @@ -69,7 +75,9 @@ describe Projects::VariablesController do post :save_multiple, namespace_id: project.namespace.to_param, project_id: project, variables_attributes: [{ id: variable.id, key: variable.key, - value: variable.value, _destroy: 'true' }], + value: variable.value, + protected: variable.protected?.to_s, + _destroy: 'true' }], format: :json end |