On Feb 2, 5:55 pm, vihrao <[email protected]> wrote: > > Then I run it again by changing the method argument like this to update the > sesison token > assert_equal �...@bob1, Guser.update_token("[email protected]", "bob", "77a138") > It still gives a success message: 1 tests, 1 assertions, 0 failures, 0 > errors, 0 skips > > The new value of session token is never updated in the table column from > '77a38' to '77a38' . Can you please tell me how to update the sesison token > if my glogin and login fields are found to match
assert_equal uses the == method to compare the two objects, and == on activerecord doesn't compare attributes: it only compares the id of the object (ie do the compared objects represent the same row in the database) Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

