diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-15 15:49:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-15 15:49:40 +0000 |
commit | b04b1e12c5847f7d366e08af47115d985b73e185 (patch) | |
tree | 5077e33eedbf1e99b9ef9b87395f9acce844b234 /spec/controllers/projects | |
parent | a5b9fb9abc2b83304f45392642801b28f52b3f48 (diff) | |
download | gitlab-ce-b04b1e12c5847f7d366e08af47115d985b73e185.tar.gz |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r-- | spec/controllers/projects/pages_domains_controller_spec.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/controllers/projects/pages_domains_controller_spec.rb b/spec/controllers/projects/pages_domains_controller_spec.rb index c78c5fe2886..40a6f77f0d6 100644 --- a/spec/controllers/projects/pages_domains_controller_spec.rb +++ b/spec/controllers/projects/pages_domains_controller_spec.rb @@ -148,16 +148,10 @@ describe Projects::PagesDomainsController do describe 'POST verify' do let(:params) { request_params.merge(id: pages_domain.domain) } - def stub_service - service = double(:service) - - expect(VerifyPagesDomainService).to receive(:new) { service } - - service - end - it 'handles verification success' do - expect(stub_service).to receive(:execute).and_return(status: :success) + expect_next_instance_of(VerifyPagesDomainService, pages_domain) do |service| + expect(service).to receive(:execute).and_return(status: :success) + end post :verify, params: params @@ -166,7 +160,9 @@ describe Projects::PagesDomainsController do end it 'handles verification failure' do - expect(stub_service).to receive(:execute).and_return(status: :failed) + expect_next_instance_of(VerifyPagesDomainService, pages_domain) do |service| + expect(service).to receive(:execute).and_return(status: :failed) + end post :verify, params: params |