Skip to content

Commit

Permalink
Merge pull request rails#49975 from cjilbert504/duplicate-form-for-test
Browse files Browse the repository at this point in the history
remove duplicate test whose name doesn't match the tested method
  • Loading branch information
jonathanhefner authored Nov 8, 2023
2 parents c36f877 + bf4057d commit 60d05cd
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions actionview/test/template/form_helper/form_with_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -339,20 +339,6 @@ def url_for(object)
super
end

def test_form_with_requires_arguments
error = assert_raises(ArgumentError) do
form_for(nil, html: { id: "create-post" }) do
end
end
assert_equal "First argument in form cannot contain nil or be empty", error.message

error = assert_raises(ArgumentError) do
form_for([nil, nil], html: { id: "create-post" }) do
end
end
assert_equal "First argument in form cannot contain nil or be empty", error.message
end

def test_form_with
form_with(model: @post, id: "create-post") do |f|
concat f.label(:title) { "The Title" }
Expand Down

0 comments on commit 60d05cd

Please sign in to comment.