diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-03-30 11:20:47 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-03-30 11:20:47 +0300 |
commit | a26ee804d01912d49d982dfbde8e5fe1c198e04f (patch) | |
tree | ae8782f6f86fbb6002bab59376d90f7292d73781 /spec/services/projects | |
parent | b4d9d4db84933a689ed308bd11faf4442e2bbb5f (diff) |
missing the public folder is InvaildStateError
Diffstat (limited to 'spec/services/projects')
-rw-r--r-- | spec/services/projects/update_pages_service_spec.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/services/projects/update_pages_service_spec.rb b/spec/services/projects/update_pages_service_spec.rb index 0c8c05168ce..dd31a677dfe 100644 --- a/spec/services/projects/update_pages_service_spec.rb +++ b/spec/services/projects/update_pages_service_spec.rb @@ -87,7 +87,8 @@ describe Projects::UpdatePagesService do it 'fails for empty file fails' do build.update_attributes(legacy_artifacts_file: empty_file) - expect(execute).not_to eq(:success) + expect { execute } + .to raise_error(Projects::UpdatePagesService::FailedToExtractError) end end end @@ -159,7 +160,8 @@ describe Projects::UpdatePagesService do it 'fails for empty file fails' do build.job_artifacts_archive.update_attributes(file: empty_file) - expect(execute).not_to eq(:success) + expect { execute } + .to raise_error(Projects::UpdatePagesService::FailedToExtractError) end context 'when timeout happens by DNS error' do @@ -169,7 +171,7 @@ describe Projects::UpdatePagesService do end it 'raises an error' do - execute + expect { execute }.to raise_error(SocketError) build.reload expect(deploy_status).to be_failed @@ -185,7 +187,8 @@ describe Projects::UpdatePagesService do end it 'raises an error' do - execute + expect { execute } + .to raise_error(Projects::UpdatePagesService::FailedToExtractError) build.reload expect(deploy_status).to be_failed @@ -198,7 +201,7 @@ describe Projects::UpdatePagesService do allow(build).to receive(:artifacts_metadata?).and_return(false) end - it 'raises an error' do + it 'does not raise an error and remove artifacts as failed job' do execute build.reload |