Change POST to PATCH requests in the controller specs

上级 13f0e18d
...@@ -28,7 +28,7 @@ describe Groups::VariablesController do ...@@ -28,7 +28,7 @@ describe Groups::VariablesController do
context 'with invalid new variable parameters' do context 'with invalid new variable parameters' do
subject do subject do
post :update, patch :update,
group_id: group, group_id: group,
variables_attributes: [{ id: variable.id, key: variable.key, variables_attributes: [{ id: variable.id, key: variable.key,
value: 'other_value', value: 'other_value',
...@@ -55,7 +55,7 @@ describe Groups::VariablesController do ...@@ -55,7 +55,7 @@ describe Groups::VariablesController do
context 'with valid new variable parameters' do context 'with valid new variable parameters' do
subject do subject do
post :update, patch :update,
group_id: group, group_id: group,
variables_attributes: [{ id: variable.id, key: variable.key, variables_attributes: [{ id: variable.id, key: variable.key,
value: 'other_value', value: 'other_value',
...@@ -82,7 +82,7 @@ describe Groups::VariablesController do ...@@ -82,7 +82,7 @@ describe Groups::VariablesController do
context 'with a deleted variable' do context 'with a deleted variable' do
subject do subject do
post :update, patch :update,
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, value: variable.value,
......
...@@ -37,7 +37,7 @@ describe Projects::VariablesController do ...@@ -37,7 +37,7 @@ describe Projects::VariablesController do
context 'with invalid new variable parameters' do context 'with invalid new variable parameters' do
subject do subject do
post :update, patch :update,
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: 'other_value', value: 'other_value',
...@@ -64,7 +64,7 @@ describe Projects::VariablesController do ...@@ -64,7 +64,7 @@ describe Projects::VariablesController do
context 'with valid new variable parameters' do context 'with valid new variable parameters' do
subject do subject do
post :update, patch :update,
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: 'other_value', value: 'other_value',
...@@ -91,7 +91,7 @@ describe Projects::VariablesController do ...@@ -91,7 +91,7 @@ describe Projects::VariablesController do
context 'with a deleted variable' do context 'with a deleted variable' do
subject do subject do
post :update, patch :update,
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, value: variable.value,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册