Stub feature flag for spec

This commit is contained in:
Shinya Maeda 2018-10-02 19:45:39 +09:00 committed by Alessio Caiazza
parent 7fe14c42a9
commit 9613f7e2fb
2 changed files with 8 additions and 0 deletions

View file

@ -327,6 +327,10 @@ describe Ci::Build do
describe '#enqueue_scheduled' do
subject { build.enqueue_scheduled }
before do
stub_feature_flags(ci_enable_scheduled_build: true)
end
context 'when build is scheduled and the right time has not come yet' do
let(:build) { create(:ci_build, :scheduled, pipeline: pipeline) }

View file

@ -7,6 +7,10 @@ describe Ci::RunScheduledBuildService do
subject { described_class.new(project, user).execute(build) }
before do
stub_feature_flags(ci_enable_scheduled_build: true)
end
context 'when user can update build' do
before do
project.add_developer(user)