diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-19 20:12:56 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-01-31 22:55:28 +0000 |
commit | 06d96a9a624d31294bdf16a4662aaa7121274061 (patch) | |
tree | dc6c17d67fa7894b632ac51d48f94dbaf6732e12 /spec/services | |
parent | 8a861c87bf8ba71d5c1a479c8118d9ed6aaf8e88 (diff) | |
download | gitlab-ce-06d96a9a624d31294bdf16a4662aaa7121274061.tar.gz |
Introduce pages_deployed? to Project model
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/projects/update_pages_service_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/services/projects/update_pages_service_spec.rb b/spec/services/projects/update_pages_service_spec.rb index 68e66866340..51da582c497 100644 --- a/spec/services/projects/update_pages_service_spec.rb +++ b/spec/services/projects/update_pages_service_spec.rb @@ -27,9 +27,9 @@ describe Projects::UpdatePagesService do end it 'succeeds' do - expect(project.pages_url).to be_nil + expect(project.pages_deployed?).to be_falsey expect(execute).to eq(:success) - expect(project.pages_url).to_not be_nil + expect(project.pages_deployed?).to be_truthy end it 'limits pages size' do @@ -39,11 +39,11 @@ describe Projects::UpdatePagesService do it 'removes pages after destroy' do expect(PagesWorker).to receive(:perform_in) - expect(project.pages_url).to be_nil + expect(project.pages_deployed?).to be_falsey expect(execute).to eq(:success) - expect(project.pages_url).to_not be_nil + expect(project.pages_deployed?).to be_truthy project.destroy - expect(Dir.exist?(project.public_pages_path)).to be_falsey + expect(project.pages_deployed?).to be_falsey end it 'fails if sha on branch is not latest' do @@ -61,7 +61,7 @@ describe Projects::UpdatePagesService do it 'fails to remove project pages when no pages is deployed' do expect(PagesWorker).to_not receive(:perform_in) - expect(project.pages_url).to be_nil + expect(project.pages_deployed?).to be_falsey project.destroy end |