summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2018-03-23 21:08:02 +0000
committerRobert Speicher <robert@gitlab.com>2018-03-23 21:08:02 +0000
commit93e216e6a5b3d3af08c054d662f8d361c812cecc (patch)
treeb273bc06cec7c33277a1ff0fbe232a99a5bd3116
parentd6abee51894ba90c15b02202a6e1b5842b74cf00 (diff)
parent1f04248cd8f12c84ec093095f79cf0715153c3e2 (diff)
downloadgitlab-ce-93e216e6a5b3d3af08c054d662f8d361c812cecc.tar.gz
Merge branch '28857-followup-fix-pages-test' into 'master'
Fix a test that is going to break, that has not broken yet See merge request gitlab-org/gitlab-ce!17966
-rw-r--r--spec/features/projects/pages_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/features/projects/pages_spec.rb b/spec/features/projects/pages_spec.rb
index 020738ae865..bdd49f731c7 100644
--- a/spec/features/projects/pages_spec.rb
+++ b/spec/features/projects/pages_spec.rb
@@ -244,10 +244,11 @@ feature 'Pages' do
end
context 'setting could not be updated' do
+ let(:service) { instance_double('Projects::UpdateService') }
+
before do
- allow_any_instance_of(Projects::UpdateService)
- .to receive(:execute)
- .and_return(status: :error)
+ allow(Projects::UpdateService).to receive(:new).and_return(service)
+ allow(service).to receive(:execute).and_return(status: :error)
end
scenario 'tries to change the setting' do