mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-07 23:30:08 +09:00
Compile the PWA help and account settings through Herb
Rails main compiles HTML templates through Herb under the 8.2 framework
defaults, which Campfire loads. Herb rejects `case` and its first `when`
in a single ERB tag, so the three pwa/ partials failed to compile, and
`herb:check` rejects ERB output in attribute names, which the account
settings' switch used for `checked`. Give `case` its own tag and build
the switch with tag.input; both render the same under Erubi.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 244e77241b)
This commit is contained in:
@@ -10,6 +10,16 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_response :ok
|
||||
end
|
||||
|
||||
test "edit shows whether room creation is restricted to administrators" do
|
||||
get edit_account_url
|
||||
assert_select "label.switch input.switch__input[type=checkbox]:not([checked])"
|
||||
|
||||
accounts(:signal).update!(settings: { restrict_room_creation_to_administrators: true })
|
||||
|
||||
get edit_account_url
|
||||
assert_select "label.switch input.switch__input[type=checkbox][checked][data-action='change->form#submit']"
|
||||
end
|
||||
|
||||
test "edit groups administrators separately from members with a divider" do
|
||||
get edit_account_url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user