mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
4f96e739c2
This commit removes a deprecated catch-all route in the AV tests. It defines and includes the necessary routes for each test such that we don't need the catch-all anymore. This also helps push us toward #33970
17 lines
521 B
Ruby
17 lines
521 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "abstract_unit"
|
|
require "template/erb/helper"
|
|
|
|
module ERBTest
|
|
class TagHelperTest < BlockTestCase
|
|
test "form_for works" do
|
|
routes = ActionDispatch::Routing::RouteSet.new
|
|
routes.draw do
|
|
get "/blah/update", to: "blah#update"
|
|
end
|
|
output = render_content "form_for(:staticpage, :url => {:controller => 'blah', :action => 'update'})", "", routes
|
|
assert_match %r{<form.*action="/blah/update".*method="post">.*</form>}, output
|
|
end
|
|
end
|
|
end
|