Just to let everyone know, this was a stupid mistake on my part. The
AdminAreaController authenticates the user, and I wasn''t setting up
the session right.
On 9/1/06, dasil003 <gabriel.d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> So I have my admin controllers set up to inherit from an
> AdminAreaController for the purpose of authentication. The setup is
> much like Justin French describes at:
>
> http://justinfrench.com/index.php?id=122
>
> Everything works great from the browser, but I''m running into this
bug
> in my functional tests:
>
> test_artist_list(Admin::ArtistControllerTest)
> [./test/functional/admin/artist_controller_test.rb:17]:
> Expected response to be a <:success>, but was <302>
>
> The test in question simply does:
>
> get :index
> assert_response :success
>
> Like I said, it works fine in a browser (no redirect), and it works
> fine if I change the inheritance of ArtistController to inherit from
> ActiveController again instaed of AdminAreaController.
>
> Also at the end of the tests I get this:
>
> Unable to map class Admin::ArtistControllerTest to a file
>
> Which is pretty cryptic as well, since that is the file that creates
> the failure!
>
> Something screwy is going on. I really don''t want to give up my
> controller inheritance, but if I can''t get functional tests
working I
> may have to. Any ideas?
>
>
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---