Skip to content

Commit

Permalink
Warn about an incompatibility between Devise and Mongoid
Browse files Browse the repository at this point in the history
  • Loading branch information
vinibaggio committed Feb 25, 2011
1 parent 0cc900e commit aa81df2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/models/token_authenticatable_test.rb
Expand Up @@ -27,12 +27,17 @@ class TokenAuthenticatableTest < ActiveSupport::TestCase
end

test 'should return nil when authenticating an invalid user by authentication token' do
skip 'Currently raises an exception with Mongoid.' if DEVISE_ORM == :mongoid
if DEVISE_ORM == :mongoid
raise 'There is an incompatibility between Devise and Mongoid' <<
' that makes this test break. For more information, check' <<
' this issue: https://github.com/mongoid/mongoid/issues/725'
end

user = create_user
user.ensure_authentication_token!
user.confirm!
authenticated_user = User.find_for_token_authentication(:auth_token => user.authentication_token.reverse)
assert_nil authenticated_user
end

end
end

0 comments on commit aa81df2

Please sign in to comment.