This project is archived and is in readonly mode.
fix snowman test helper to include _method only on non-GET or non-POST
-
Aditya Sanghi
- Title changed from fix snowman test helper to include _method only on put or delete to fix snowman test helper to include _method only on non-GET or non-POST
-
Aditya Sanghi
- Title changed from fix snowman test helper to include _method only on non-GET or non-POST to [PATCH] fix snowman test helper to include _method only on non-GET or non-POST
-
Aditya Sanghi
- Assigned user set to José Valim
- Tag changed from tests actionpack, 3.x, actionview to tests actionpack, 3.x, actionview, patch
To be clearer, when writing tests, using whole_form and snowman helpers methods led to incorrect expected text. Those helpers do not handle "get" method forms very well which is what this patch fixes.
{mkd-extraction-27744e020310fe464731a5d317065098}
<%= form_for(@post, :url => search_posts_path, :html => {:method => :get}) do |f| %><% end %>
was resulting in the snowman function putting a hidden parameter for "_method" with value = "get" which is wrong. The form_text was also hard-coded to always put the method in the form as "post".
-
Aditya Sanghi
Is more information required for this ticket?
-
José Valim
- Importance changed from to Low
It seems it does not. However be patient as I am a bit busy right now. I will apply it this or next week when I give another pass in LH applying tickets.
-
Jeff Kreeftmeijer
- Title changed from [PATCH] fix snowman test helper to include _method only on non-GET or non-POST to fix snowman test helper to include _method only on non-GET or non-POST
Using the "patch" tag instead of prefixing the ticket title with "[PATCH]" to make sure patched tickets end up in the open patches bin. :)
-
Repository
- State changed from new to resolved
(from [582a088ba7f3e720a259f6e01b3fabcda87484b7]) Fix test helpers to ensure get method forms are properly tested [#5753 fix snowman test helper to include _method only on non-GET or non-POST state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/582a088ba7f3e720a259f6e01b3fab...
