forked from theforeman/foreman_maintain
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |