Skip to content

Commit

Permalink
Refs #32848 - Ensure the Foreman version is nightly in tests
Browse files Browse the repository at this point in the history
This copies the behavior of the stable release test for nightly to avoid
breaking on stable branches.

(cherry picked from commit 7e63755)
  • Loading branch information
ekohl authored and evgeni committed Nov 30, 2023
1 parent b61cce1 commit 99a191b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/controllers/links_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ class LinksControllerTest < ActionController::TestCase
end

test 'new docs on nightly' do
get :show, params: {
type: 'docs',
section: 'TestSection',
chapter: 'TestChapter',
}
with_temporary_settings(version: Foreman::Version.new('3.10-develop')) do
get :show, params: {
type: 'docs',
section: 'TestSection',
chapter: 'TestChapter',
}

assert_redirected_to %r{https://docs\.theforeman\.org/nightly/TestSection/index-(foreman-(deb|el)|katello)\.html#TestChapter}
assert_redirected_to %r{https://docs\.theforeman\.org/nightly/TestSection/index-(foreman-(deb|el)|katello)\.html#TestChapter}
end
end

test 'new docs on a stable release' do
Expand Down

0 comments on commit 99a191b

Please sign in to comment.