Re: Failing functional tests when controllers work

pjmorse
Fri, 22 Feb 2008 21:53:42 -0000

Ilan, thanks for the ruby-debug tip, I''ll need that one of these days.

For this one, I followed Phlip''s suggestion and switched to save!,
which confirmed Ilan''s suggestion that the parameters were not
correct. I needed to set the params to create a user object, e.g.

    post :create, {:user => {:username => "testuser", :password
=>
''secret'', :password_confirmation =>
''secret'', :email =>
''test-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org''}}, {:user =>
users(:admin1)}

...not sure yet how this will work with the update bug, but it should
fix the save bug across all three tests. Thanks!

On Feb 22, 4:43 pm, Phlip
<phlip2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> pjmorse wrote:
> >            if @user.save
> >                         # Tests never reach this code
>
> Temporarily change that to @user.save! and read the error diagnostic?