Skip to content

Commit

Permalink
Refs #35404 - add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Oct 6, 2022
1 parent fced42e commit 19fe602
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/definitions/scenarios/self_upgrade_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require 'test_helper'

module Scenarios
describe ForemanMaintain::Scenarios::SelfUpgradeBase do
include DefinitionsTestHelper

describe 'with default params' do
let(:scenario) do
ForemanMaintain::Scenarios::SelfUpgradeBase.new
end

it 'computes the target version correctly coming from normal release 6.10.0' do
assume_satellite_present do |feature_class|
feature_class.any_instance.stubs(:current_version => version('6.10.0'))
end

assert_equal '6.11', scenario.target_version
end

it 'computes the target version correctly coming from an async release 6.11.1.1' do
assume_satellite_present do |feature_class|
feature_class.any_instance.stubs(:current_version => version('6.11.1.1'))
end

assert_equal '6.12', scenario.target_version
end
end
end
end

0 comments on commit 19fe602

Please sign in to comment.