require'spec_helper'describeBuildCoverageWorkerdodescribe'#perform'docontext'when build exists'dolet!(:build){create(:ci_build)}it'updates code coverage'doexpect_any_instance_of(Ci::Build).toreceive(:update_coverage)described_class.new.perform(build.id)endendcontext'when build does not exist'doit'does not raise exception'doexpect{described_class.new.perform(123)}.not_toraise_errorendendendend