20 lines
628 B
Ruby
20 lines
628 B
Ruby
# 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
|
|
|
|
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
|
|
end
|