blob: d7bdbad26ceaa676b90fdefe32a13317cb4c65af (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# frozen_string_literal: true
require 'test_helper'
class ActionText::FormHelperTest < ActionView::TestCase
tests ActionText::TagHelper
def form_with(*)
@output_buffer = super
end
test "rich_text_area doesn't raise when attributes don't exist in the model" do
assert_nothing_raised do
form_with(model: Message.new, scope: :message, id: "create-message") do |form|
form.rich_text_area(:not_an_attribute)
end
end
assert_match "message[not_an_attribute]", output_buffer
end
end
|