diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 18:08:22 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 18:08:22 +0000 |
commit | 123c68a7cf788ace140e57e478a12c5b7ac893ae (patch) | |
tree | b36e565ecd895ee46c1713f3734308cfce0e6ba9 /spec/models/ci/build_spec.rb | |
parent | 862d225ca0d8eb452e56b8fe5a0109aac796e872 (diff) | |
download | gitlab-ce-123c68a7cf788ace140e57e478a12c5b7ac893ae.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/ci/build_spec.rb')
-rw-r--r-- | spec/models/ci/build_spec.rb | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 371982df2bb..8a701a461c0 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -1275,68 +1275,6 @@ describe Ci::Build do end end - describe '#requires_resource?' do - subject { build.requires_resource? } - - context 'when build needs a resource from a resource group' do - let(:resource_group) { create(:ci_resource_group, project: project) } - let(:build) { create(:ci_build, resource_group: resource_group, project: project) } - - context 'when build has not retained a resource' do - it { is_expected.to eq(true) } - end - - context 'when build has retained a resource' do - before do - resource_group.retain_resource_for(build) - end - - it { is_expected.to eq(false) } - - context 'when ci_resource_group feature flag is disabled' do - before do - stub_feature_flags(ci_resource_group: false) - end - - it { is_expected.to eq(false) } - end - end - end - - context 'when build does not need a resource from a resource group' do - let(:build) { create(:ci_build, project: project) } - - it { is_expected.to eq(false) } - end - end - - describe '#retains_resource?' do - subject { build.retains_resource? } - - context 'when build needs a resource from a resource group' do - let(:resource_group) { create(:ci_resource_group, project: project) } - let(:build) { create(:ci_build, resource_group: resource_group, project: project) } - - context 'when build has retained a resource' do - before do - resource_group.retain_resource_for(build) - end - - it { is_expected.to eq(true) } - end - - context 'when build has not retained a resource' do - it { is_expected.to eq(false) } - end - end - - context 'when build does not need a resource from a resource group' do - let(:build) { create(:ci_build, project: project) } - - it { is_expected.to eq(false) } - end - end - describe '#stops_environment?' do subject { build.stops_environment? } |