diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-10 06:08:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-10 06:08:07 +0000 |
commit | 232655bf32cd474d54de357b65ef43d77271117c (patch) | |
tree | d176e36660e41bb2b629237639015d4dde7d4414 /spec/support/shared_examples/models/cluster_application_version_shared_examples.rb | |
parent | f5ae9d0960aa422a65a2a22e230100257dddb9ed (diff) | |
download | gitlab-ce-232655bf32cd474d54de357b65ef43d77271117c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/models/cluster_application_version_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/models/cluster_application_version_shared_examples.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/support/shared_examples/models/cluster_application_version_shared_examples.rb b/spec/support/shared_examples/models/cluster_application_version_shared_examples.rb index e293467774e..cf7010c48c2 100644 --- a/spec/support/shared_examples/models/cluster_application_version_shared_examples.rb +++ b/spec/support/shared_examples/models/cluster_application_version_shared_examples.rb @@ -2,16 +2,18 @@ RSpec.shared_examples 'cluster application version specs' do |application_name| describe 'update_available?' do + let_it_be(:cluster) { create(:cluster, :provided_by_gcp) } + let(:version) { '0.0.0' } - subject { create(application_name, :installed, version: version).update_available? } + subject { build(application_name, :installed, version: version, cluster: cluster).update_available? } context 'version is not the same as VERSION' do it { is_expected.to be_truthy } end context 'version is the same as VERSION' do - let(:application) { build(application_name) } + let(:application) { build(application_name, cluster: cluster) } let(:version) { application.class.const_get(:VERSION, false) } it { is_expected.to be_falsey } |