This project is archived and is in readonly mode.
params are strings IRL, integers in test
-
David Trasbo
This can be duplicated on edge Rails:
class TestsController < ApplicationController def show render :text => params[:id].class.to_s end endrequire 'test_helper' class TestsControllerTest < ActionController::TestCase test "id param is a Fixnum" do get :show, :id => 42 assert_equal 'Fixnum', response.body end endI definitely think this should be fixed. Since a controller will always receive all parameters as strings in real life, I think all parameters passed from tests should be converted to strings for consistency.
-
Ryan Bigg
Patch welcome.
-
Andrew White
This has come up before: #2984 Warn when parameters to functional test requests have improper values
-
Ryan Bigg
- State changed from new to duplicate