diff options
author | Peter Leitzen <pleitzen@gitlab.com> | 2019-01-06 15:59:10 +0300 |
---|---|---|
committer | Peter Leitzen <pleitzen@gitlab.com> | 2019-01-06 17:13:14 +0300 |
commit | b78ac977eeb8d631ff6c56674d8c081a3249138b (patch) | |
tree | 96e1ce80845578485c2229d8e51e940910f9ac44 /spec/services | |
parent | 1aa2ac13b95b9fa9527596610bb07e132dc1a6f0 (diff) |
Move settings operations controller from EE to CE
This commit prepares the structure for the upcoming feature error
tracking.
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/projects/operations/update_service_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/services/projects/operations/update_service_spec.rb b/spec/services/projects/operations/update_service_spec.rb new file mode 100644 index 00000000000..332c1600cde --- /dev/null +++ b/spec/services/projects/operations/update_service_spec.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Projects::Operations::UpdateService do + set(:user) { create(:user) } + set(:project) { create(:project) } + + let(:result) { subject.execute } + + subject { described_class.new(project, user, params) } + + describe '#execute' do + context 'with inappropriate params' do + let(:params) { { name: '' } } + + let!(:original_name) { project.name } + + it 'ignores params' do + expect(result[:status]).to eq(:success) + expect(project.reload.name).to eq(original_name) + end + end + end +end |