On Dec 8, 1:00 am, Frederick Cheung <[email protected]>
wrote:
> > def test_should_update_book_name
> > login_as(:sanj)
> > assert_difference('Book.count',0) do
> > post :update, :book => {:name => "shkj"}
> > end
> > end
>
> > i guess i m assuming that i m updating the name to shjk...
>
> > but where do i check that..???
>
> > i m totallyy lost and coming up with weird doubts
>
> > but thank u all for replyin..i shall look into ur suggestions
>
> Well typically you'd fetch that row from the database to check that
> the book's name had actually changed (that test looks wrong though -
> you're not telling your controller which row to update)
>
> Fred
>
>
hi..

to fetch tat row..the command i gave is Book.find(1)

in the script/console test

but it reads the data from the fixtures and just displays that...

how do i tell the controller which row to update..and how do i check
that particular row whether its updated?..thank you

--

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.


Reply via email to