aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2017-02-20 00:35:14 +0200
committerbogdanvlviv <bogdanvlviv@gmail.com>2017-02-20 01:27:32 +0200
commit32b74fe2551ad7e4b5e592bf6efe9b377bce8bbb (patch)
treea448ad1cb81a281867446b0974c027ede39454f5 /actionview/test
parentf1a097733a6923d4c7b6b4413394ce86e17198d6 (diff)
downloadrails-32b74fe2551ad7e4b5e592bf6efe9b377bce8bbb.tar.gz
rails-32b74fe2551ad7e4b5e592bf6efe9b377bce8bbb.tar.bz2
rails-32b74fe2551ad7e4b5e592bf6efe9b377bce8bbb.zip
Set correct "routes" in tests cases
Diffstat (limited to 'actionview/test')
-rw-r--r--actionview/test/template/erb/tag_helper_test.rb4
-rw-r--r--actionview/test/template/form_helper_test.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/actionview/test/template/erb/tag_helper_test.rb b/actionview/test/template/erb/tag_helper_test.rb
index 84e328d8be..233f37c48a 100644
--- a/actionview/test/template/erb/tag_helper_test.rb
+++ b/actionview/test/template/erb/tag_helper_test.rb
@@ -18,8 +18,8 @@ module ERBTest
end
test "percent equals works with form tags" do
- expected_output = %r{<form.*action="foo".*method="post">.*hello*</form>}
- assert_match expected_output, render_content("form_tag('foo')", "<%= 'hello' %>")
+ expected_output = %r{<form.*action="/foo".*method="post">.*hello*</form>}
+ assert_match expected_output, render_content("form_tag('/foo')", "<%= 'hello' %>")
end
test "percent equals works with fieldset tags" do
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb
index 490df5e4d9..b3a180b28a 100644
--- a/actionview/test/template/form_helper_test.rb
+++ b/actionview/test/template/form_helper_test.rb
@@ -257,11 +257,11 @@ class FormHelperTest < ActionView::TestCase
end
def test_label_with_non_active_record_object
- form_for(OpenStruct.new(name: "ok"), as: "person", url: "an_url", html: { id: "create-person" }) do |f|
+ form_for(OpenStruct.new(name: "ok"), as: "person", url: "/an", html: { id: "create-person" }) do |f|
f.label(:name)
end
- expected = whole_form("an_url", "create-person", "new_person", method: "post") do
+ expected = whole_form("/an", "create-person", "new_person", method: "post") do
'<label for="person_name">Name</label>'
end