require'spec_helper'describePipelineHooksWorkerdodescribe'#perform'docontext'when pipeline exists'dolet(:pipeline){create(:ci_pipeline)}it'executes hooks for the pipeline'doexpect_any_instance_of(Ci::Pipeline).toreceive(:execute_hooks)described_class.new.perform(pipeline.id)endendcontext'when pipeline does not exist'doit'does not raise exception'doexpect{described_class.new.perform(123)}.not_toraise_errorendendendend