Files
rickyandClaude Opus 5.5 e8b0cd030e What's new stays short as releases pile up
- Admin → About shows the running version's release notes, with a link
  to all releases.
- The What's new page keeps the running version (and any newer) open and
  folds each older release to one line, grouped by month: its version
  and a count of its changes, fixes and notes for administrators.
- CHANGELOG.md itself is unchanged and reads the same on GitHub; the
  app splits it into releases when shown (Changelog).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 13:38:45 -05:00

32 lines
1.3 KiB
Ruby

require "test_helper"
# Releases: version (YYYY.MM.N, from VERSION) plus build (the commit), and
# release notes (CHANGELOG.md) as "What's new".
class VersioningTest < ActionDispatch::IntegrationTest
test "the version comes from VERSION; About shows version, build and What's new" do
version = File.read(Rails.root.join("VERSION")).strip
assert_match(/\A\d{4}\.\d{1,2}\.\d+\z/, version)
info = SystemInfo.new
assert_equal version, info.version
assert_equal "#{version} (build #{info.revision})", info.version_label
sign_in create_user("admin@example.com", admin: true)
get admin_about_path
assert_select "[data-version]", text: version
assert_select "[data-revision]", text: /Build/
assert_select "a[href='#{help_page_path('changelog')}']", text: "What's new"
get help_page_path("changelog")
assert_response :success
assert_select "h1", text: /What.s new/
assert_select "details[open] summary h3", text: version # the current version has release notes
end
test "each recorded software build remembers its version" do
AppRevision.touch_current!
revision = AppRevision.find_by(revision: SystemInfo.new.revision)
skip "no git revision in this environment" unless revision
assert_equal SystemInfo.new.version, revision.version
end
end