On 27 Oct 2008, at 10:43, Vahagn Hayrapetyan wrote:


Hi Fred,-

login_as works in all other tests! And I actually test it by the puts
statements, it works because I can see the admin_user's id is 2, and
email is [EMAIL PROTECTED] This means that login_as works by loading
that user from the fixture:

Fair enough (although you're not actually testing that it works, just that that fixture exists, which is different from whether the session has been faked up properly or something like that). I'd still check your logs to see if some filter or something is stopping your action from running. Another possibility is a validation failure.

Fred
admin_user:
 id: 2
 username: admin
 email: [EMAIL PROTECTED]
 hashed_password: #very long hash
 created_at: <%= 1.days.ago.to_s(:db) %>

/ Vahagn

Frederick Cheung wrote:
On Oct 27, 10:33�am, Vahagn Hayrapetyan <rails-mailing- [EMAIL PROTECTED]
s.net> wrote:
are supposed to. Here's a method from NewslettersControllerTest:
Have you tried looking a little closer at why its failing ? Eg stick a
breakpoint in the action and see what happens. If the action doesn't
run at all because of some filter (eg authentication  - are you sure
your login_as method works ?) then there will be a note in test.log

Fred

--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to