mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
MongoMapper test suite fixes
This commit is contained in:
parent
b3283e097d
commit
4a51394af5
3 changed files with 6 additions and 6 deletions
|
@ -16,7 +16,7 @@ class RegistrationTest < ActionController::IntegrationTest
|
|||
assert_contain 'You have signed up successfully.'
|
||||
assert warden.authenticated?(:admin)
|
||||
|
||||
admin = Admin.last
|
||||
admin = Admin.last :order => "id"
|
||||
assert_equal admin.email, 'new_user@test.com'
|
||||
end
|
||||
|
||||
|
@ -34,7 +34,7 @@ class RegistrationTest < ActionController::IntegrationTest
|
|||
|
||||
assert_not warden.authenticated?(:user)
|
||||
|
||||
user = User.last
|
||||
user = User.last :order => "id"
|
||||
assert_equal user.email, 'new_user@test.com'
|
||||
assert_not user.confirmed?
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ class Admin
|
|||
include MongoMapper::Document
|
||||
include MongoMapper::Plugins::Callbacks
|
||||
|
||||
devise :authenticatable, :timeoutable
|
||||
devise :authenticatable, :timeoutable, :registerable
|
||||
|
||||
def self.find_for_authentication(conditions)
|
||||
last(:conditions => conditions, :order => "email")
|
||||
|
|
|
@ -3,9 +3,9 @@ class User
|
|||
|
||||
key :created_at, DateTime
|
||||
|
||||
devise :authenticatable, :http_authenticatable, :confirmable, :recoverable,
|
||||
:rememberable, :trackable, :validatable, :timeoutable, :lockable,
|
||||
:token_authenticatable
|
||||
devise :authenticatable, :http_authenticatable, :confirmable, :lockable, :recoverable,
|
||||
:registerable, :rememberable, :timeoutable, :token_authenticatable,
|
||||
:trackable, :validatable
|
||||
|
||||
# attr_accessible :username, :email, :password, :password_confirmation
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue