diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-04 21:49:39 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-05 10:35:58 +0200 |
commit | b009a0084c67877ba6a808c4c8a81c568598d624 (patch) | |
tree | 047e4693e3f2ea4425e4a10ea07080c53196d61f /spec/services | |
parent | f12ee2a2f490e6d126ac6345a5ad7cbf12833791 (diff) | |
download | gitlab-ce-b009a0084c67877ba6a808c4c8a81c568598d624.tar.gz |
Remove PagesService and instead make it explicit that we call PagesWorkeroptimise-pages-service-calling
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/pages_service_spec.rb | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/spec/services/pages_service_spec.rb b/spec/services/pages_service_spec.rb deleted file mode 100644 index f8db6900a0a..00000000000 --- a/spec/services/pages_service_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -require 'spec_helper' - -describe PagesService do - let(:build) { create(:ci_build) } - let(:data) { Gitlab::DataBuilder::Build.build(build) } - let(:service) { described_class.new(data) } - - before do - allow(Gitlab.config.pages).to receive(:enabled).and_return(true) - end - - context 'execute asynchronously for pages job' do - before do - build.name = 'pages' - end - - context 'on success' do - before do - build.success - end - - it 'executes worker' do - expect(PagesWorker).to receive(:perform_async) - service.execute - end - end - - %w(pending running failed canceled).each do |status| - context "on #{status}" do - before do - build.status = status - end - - it 'does not execute worker' do - expect(PagesWorker).not_to receive(:perform_async) - service.execute - end - end - end - end - - context 'for other jobs' do - before do - build.name = 'other job' - build.success - end - - it 'does not execute worker' do - expect(PagesWorker).not_to receive(:perform_async) - service.execute - end - end -end |