19 lines
616 B
Ruby
19 lines
616 B
Ruby
# 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
|