Tom Mornini
2006-Apr-22 09:52 UTC
[Rails] Question about functional tests and log/test.log
Here''s something a bit weird: After running functional tests, my test log contains many lines, including many like these:> Processing UserController#attempt_login (for 0.0.0.0 at 2006-04-22 > 02:38:08) [POST] > Session ID: > Parameters: {"user"=>{"password"=>"bogus", > "email"=>"tmornini@bogus.com"}, "action"=>"attempt_login", > "controller"=>"user"} > [4;36;1mSQL (0.006807) [0;1mPRAGMA table_info(users) > [4;35;1mUser Load (0.000963) SELECT * FROM users WHERE > (users.deleted_at IS NULL) AND (email = ''tmornini@bogus.com'' and > hashed_password = ''5d0527d81f6c2d901a0a2d889cb73f9499402626'' and > verified = ''t'') LIMIT 1 > Rendering layoutfalseactionlogin within layouts/application > Rendering user/login > Rendered user/_login_form (0.00581) > Completed in 0.03044 (32 reqs/sec) | Rendering: 0.01101 (36%) | DB: > 0.00777 (25%) | 200 OK [http://test.host/user/attempt_login? > user=emailtmornini%40bogus.compasswordbogus]> Processing UserController#attempt_login (for 0.0.0.0 at 2006-04-22 > 02:38:08) [POST] > Session ID: > Parameters: {"user"=>{"password"=>"bogus", > "email"=>"tmornini@mac.com"}, "action"=>"attempt_login", > "controller"=>"user"} > [4;36;1mUser Load (0.000720) [0;1mSELECT * FROM users > WHERE (users.deleted_at IS NULL) AND (email = ''tmornini@mac.com'' > and hashed_password = ''5d0527d81f6c2d901a0a2d889cb73f9499402626'' > and verified = ''t'') LIMIT 1 > Rendering layoutfalseactionlogin within layouts/application > Rendering user/login > Rendered user/_login_form (0.00249) > Completed in 0.00948 (105 reqs/sec) | Rendering: 0.00599 (63%) | > DB: 0.00072 (7%) | 200 OK [http://test.host/user/attempt_login? > user=emailtmornini%40bogus.compasswordbogus]What is up with the URLs at the end of those lines? These are both generated by this test: post :attempt_login, :user => { :email => ''tmornini@bogus.com'', :password => ''bogus'' } The second is generated by this test: post :attempt_login, { :user => { :email => ''tmornini@mac.com'', :password => ''bogus'' } } Why is one test creating two entries? Do those URLs mean anything? They appear to contain the POST parameters. However, upon inspection, they''re both the same even though the POST parameters are different! And then there''s this: Rendering layoutfalseactionlogin within layouts/application What is going on there? -- -- Tom Mornini
Alex Wayne
2006-Apr-22 11:25 UTC
[Rails] Re: Question about functional tests and log/test.log
Tom Mornini wrote:> Here''s something a bit weird: > > > What is up with the URLs at the end of those lines? > > > Why is one test creating two entries? > > Do those URLs mean anything? They appear to contain the POST parameters. > However, upon inspection, they''re both the same even though the POST > parameters are different! > > And then there''s this: > > Rendering layoutfalseactionlogin within layouts/application > > What is going on there? > > -- > -- Tom MorniniI wouldn''t worry about it too much, rails test logging isn''t entirely as clean as it should be. My tests show incorrect query string on post requests as well, but all the tests pass just fine. Your test.log looks completely normal to me. -- Posted via http://www.ruby-forum.com/.
Craig White
2006-Apr-22 13:14 UTC
[Rails] Re: Question about functional tests and log/test.log
On Sat, 2006-04-22 at 13:25 +0200, Alex Wayne wrote:> Tom Mornini wrote: > > Here''s something a bit weird: > > > > > > What is up with the URLs at the end of those lines? > > > > > > Why is one test creating two entries? > > > > Do those URLs mean anything? They appear to contain the POST parameters. > > However, upon inspection, they''re both the same even though the POST > > parameters are different! > > > > And then there''s this: > > > > Rendering layoutfalseactionlogin within layouts/application > > > > What is going on there? > > > > -- > > -- Tom Mornini > > I wouldn''t worry about it too much, rails test logging isn''t entirely as > clean as it should be. My tests show incorrect query string on post > requests as well, but all the tests pass just fine. Your test.log looks > completely normal to me.---- Rendering layoutfalseactionlogin suggests an error to me. Craig