diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/workers/pages_remove_worker_spec.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'spec/workers/pages_remove_worker_spec.rb')
-rw-r--r-- | spec/workers/pages_remove_worker_spec.rb | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/spec/workers/pages_remove_worker_spec.rb b/spec/workers/pages_remove_worker_spec.rb index 638e87043f2..864aa763fa9 100644 --- a/spec/workers/pages_remove_worker_spec.rb +++ b/spec/workers/pages_remove_worker_spec.rb @@ -3,24 +3,23 @@ require 'spec_helper' RSpec.describe PagesRemoveWorker do - let_it_be(:project) { create(:project, path: "my.project")} - let_it_be(:domain) { create(:pages_domain, project: project) } + let(:project) { create(:project, path: "my.project")} + let!(:domain) { create(:pages_domain, project: project) } + subject { described_class.new.perform(project.id) } + before do + project.mark_pages_as_deployed + end + it 'deletes published pages' do + expect(project.pages_deployed?).to be(true) + expect_any_instance_of(Gitlab::PagesTransfer).to receive(:rename_project).and_return true expect(PagesWorker).to receive(:perform_in).with(5.minutes, :remove, project.namespace.full_path, anything) subject - expect(project.reload.pages_metadatum.deployed?).to be(false) - end - - it 'deletes all domains' do - expect(project.pages_domains.count).to be 1 - - subject - - expect(project.reload.pages_domains.count).to be 0 + expect(project.reload.pages_deployed?).to be(false) end end |