2024-06-05 18:45:45 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require "test_helper"
|
|
|
|
|
|
|
|
class CharacterSheetSectionTest < ActiveSupport::TestCase
|
|
|
|
test "name must exist" do
|
|
|
|
assert_must_exist(character_sheet_sections(:stats), "name")
|
|
|
|
end
|
2024-06-21 10:22:25 +00:00
|
|
|
|
|
|
|
test "returns correct order index" do
|
|
|
|
assert_equal 3, character_sheet_sections(:stats).highest_order_index
|
|
|
|
assert_equal 1, character_sheet_sections(:stats).lowest_order_index
|
|
|
|
end
|
|
|
|
|
|
|
|
test "an empty section returns 1 for lowest/highest order index" do
|
|
|
|
assert_equal 1, character_sheet_sections(:empty).lowest_order_index
|
|
|
|
assert_equal 1, character_sheet_sections(:empty).highest_order_index
|
|
|
|
end
|
2024-06-05 18:45:45 +00:00
|
|
|
end
|