tabletop-companion/test/integration/edit_character_sheet_test.rb

19 lines
616 B
Ruby
Raw Permalink Normal View History

2024-06-10 17:02:09 +00:00
# frozen_string_literal: true
require "test_helper"
class EditCharacterSheetTest < ActionDispatch::IntegrationTest
test "Sheet is only editable when parameter is set" do
user = users(:trevor)
sign_in user
get character_character_sheet_sections_path(characters(:nardren))
assert_response :success
assert_no_match I18n.t("character_sheet_sections.index.add_section"), response.body
get character_character_sheet_sections_path(characters(:nardren), editable: true)
assert_response :success
assert_match I18n.t("character_sheet_sections.index.add_section"), response.body
end
end