2019-03-02 22:35:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
shared_examples 'cluster application version specs' do |application_name|
|
|
|
|
describe 'update_available?' do
|
|
|
|
let(:version) { '0.0.0' }
|
|
|
|
|
|
|
|
subject { create(application_name, :installed, version: version).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) }
|
2019-12-21 20:55:43 +05:30
|
|
|
let(:version) { application.class.const_get(:VERSION, false) }
|
2019-03-02 22:35:43 +05:30
|
|
|
|
|
|
|
it { is_expected.to be_falsey }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|