diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-07-06 00:23:28 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-07-06 00:23:28 +0900 |
commit | dafc34179488d54776e80b8604513184720985cd (patch) | |
tree | 534ffedf025a31aeb74f2b21d4bf1a85f543b23d /spec/controllers | |
parent | 951dd04871a9be0bb83eac09883c130ca63cabdc (diff) | |
download | gitlab-ce-dafc34179488d54776e80b8604513184720985cd.tar.gz |
Revert "Implement Ci::NestedUniquenessValidator"
This reverts commit 8f0a2b6d780347a5ce258ac1a6a6902ce9695ca1.
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/pipeline_schedules_controller_spec.rb | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/spec/controllers/projects/pipeline_schedules_controller_spec.rb b/spec/controllers/projects/pipeline_schedules_controller_spec.rb index aa3aa06f917..bfd31f9409b 100644 --- a/spec/controllers/projects/pipeline_schedules_controller_spec.rb +++ b/spec/controllers/projects/pipeline_schedules_controller_spec.rb @@ -267,7 +267,8 @@ describe Projects::PipelineSchedulesController do end it 'returns an error that variables are duplciated' do - go + put :update, namespace_id: project.namespace.to_param, + project_id: project, id: pipeline_schedule, schedule: schedule expect(assigns(:schedule).errors['variables.key']).not_to be_empty end @@ -339,21 +340,6 @@ describe Projects::PipelineSchedulesController do expect { go }.to change { Ci::PipelineScheduleVariable.count }.by(-1) end end - - context 'when deletes and creates the same keys' do - let(:schedule) do - basic_param.merge({ - variables_attributes: [{ id: pipeline_schedule_variable.id, key: pipeline_schedule_variable.key, _destroy: true }, - { key: pipeline_schedule_variable.key, value: 'new_value' }] - }) - end - - it 'returns an error that variables are duplciated' do - go - - expect(assigns(:schedule).errors['variables.key']).not_to be_empty - end - end end end end |