Use all parameters in VariablesController specs
This commit is contained in:
parent
dcc23530bd
commit
2592aec9e3
2 changed files with 26 additions and 10 deletions
|
@ -16,8 +16,11 @@ describe Groups::VariablesController do
|
||||||
subject do
|
subject do
|
||||||
post :save_multiple,
|
post :save_multiple,
|
||||||
group_id: group,
|
group_id: group,
|
||||||
variables_attributes: [{ id: variable.id, key: variable.key, value: 'other_value' },
|
variables_attributes: [{ id: variable.id, key: variable.key,
|
||||||
{ key: '..?', value: 'dummy_value' }],
|
value: 'other_value',
|
||||||
|
protected: variable.protected?.to_s },
|
||||||
|
{ key: '..?', value: 'dummy_value',
|
||||||
|
protected: 'false' }],
|
||||||
format: :json
|
format: :json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -40,8 +43,11 @@ describe Groups::VariablesController do
|
||||||
subject do
|
subject do
|
||||||
post :save_multiple,
|
post :save_multiple,
|
||||||
group_id: group,
|
group_id: group,
|
||||||
variables_attributes: [{ id: variable.id, key: variable.key, value: 'other_value' },
|
variables_attributes: [{ id: variable.id, key: variable.key,
|
||||||
{ key: 'new_key', value: 'dummy_value' }],
|
value: 'other_value',
|
||||||
|
protected: variable.protected?.to_s },
|
||||||
|
{ key: 'new_key', value: 'dummy_value',
|
||||||
|
protected: 'false' }],
|
||||||
format: :json
|
format: :json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -65,7 +71,9 @@ describe Groups::VariablesController do
|
||||||
post :save_multiple,
|
post :save_multiple,
|
||||||
group_id: group,
|
group_id: group,
|
||||||
variables_attributes: [{ id: variable.id, key: variable.key,
|
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
|
format: :json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,11 @@ describe Projects::VariablesController do
|
||||||
subject do
|
subject do
|
||||||
post :save_multiple,
|
post :save_multiple,
|
||||||
namespace_id: project.namespace.to_param, project_id: project,
|
namespace_id: project.namespace.to_param, project_id: project,
|
||||||
variables_attributes: [{ id: variable.id, key: variable.key, value: 'other_value' },
|
variables_attributes: [{ id: variable.id, key: variable.key,
|
||||||
{ key: '..?', value: 'dummy_value' }],
|
value: 'other_value',
|
||||||
|
protected: variable.protected?.to_s },
|
||||||
|
{ key: '..?', value: 'dummy_value',
|
||||||
|
protected: 'false' }],
|
||||||
format: :json
|
format: :json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -44,8 +47,11 @@ describe Projects::VariablesController do
|
||||||
subject do
|
subject do
|
||||||
post :save_multiple,
|
post :save_multiple,
|
||||||
namespace_id: project.namespace.to_param, project_id: project,
|
namespace_id: project.namespace.to_param, project_id: project,
|
||||||
variables_attributes: [{ id: variable.id, key: variable.key, value: 'other_value' },
|
variables_attributes: [{ id: variable.id, key: variable.key,
|
||||||
{ key: 'new_key', value: 'dummy_value' }],
|
value: 'other_value',
|
||||||
|
protected: variable.protected?.to_s },
|
||||||
|
{ key: 'new_key', value: 'dummy_value',
|
||||||
|
protected: 'false' }],
|
||||||
format: :json
|
format: :json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -69,7 +75,9 @@ describe Projects::VariablesController do
|
||||||
post :save_multiple,
|
post :save_multiple,
|
||||||
namespace_id: project.namespace.to_param, project_id: project,
|
namespace_id: project.namespace.to_param, project_id: project,
|
||||||
variables_attributes: [{ id: variable.id, key: variable.key,
|
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
|
format: :json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue