Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd Behavior in Functional tests #12

Closed
liamks opened this issue Jul 5, 2009 · 1 comment
Closed

Odd Behavior in Functional tests #12

liamks opened this issue Jul 5, 2009 · 1 comment

Comments

@liamks
Copy link

liamks commented Jul 5, 2009

I've created two controller tests that test the same controller, but do it for different users (with a different set of privileges).

In the controller tests that tests a visitor I have

  setup :activate_authlogic
 def setup
    UserSession.create(users(:visitor))
 end

Which works perfectly. When I remove that code the tests fail because no one is logged on (perfect). However, in another tests, that should tests an admin the code, does not fail when the above is removed. Just to reiterate I'm testing the same controller. What's more, when I do include the code above, it does not work as expected, but does when I include "UserSession.create(users(:admin))" within each test method.

@liamks
Copy link
Author

liamks commented Jul 5, 2009

The error was resolved. Apparently having two identically named controller tests with methods that have the same name will cause issues, who would have known? =P

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant