mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 07:18:14 -05:00
Extract Activatable from Confirmable, so if you need to active your account through other means, you can still do so and ensure cherry pick works as expected.
This commit is contained in:
@@ -37,11 +37,11 @@ class Exceptable < User
|
||||
end
|
||||
|
||||
class Configurable < User
|
||||
devise :all, :stretches => 15,
|
||||
:pepper => 'abcdef',
|
||||
:confirm_within => 5.days,
|
||||
:remember_for => 7.days,
|
||||
:timeout_in => 15.minutes
|
||||
devise :all, :timeoutable, :stretches => 15,
|
||||
:pepper => 'abcdef',
|
||||
:confirm_within => 5.days,
|
||||
:remember_for => 7.days,
|
||||
:timeout_in => 15.minutes
|
||||
end
|
||||
|
||||
class ActiveRecordTest < ActiveSupport::TestCase
|
||||
@@ -60,7 +60,7 @@ class ActiveRecordTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
test 'include by default authenticatable only' do
|
||||
test 'add authenticatable module only' do
|
||||
assert_include_modules Authenticatable, :authenticatable
|
||||
end
|
||||
|
||||
@@ -90,11 +90,11 @@ class ActiveRecordTest < ActiveSupport::TestCase
|
||||
|
||||
test 'add all modules' do
|
||||
assert_include_modules Devisable,
|
||||
:authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :timeoutable, :validatable
|
||||
:authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable
|
||||
end
|
||||
|
||||
test 'configure modules with except option' do
|
||||
assert_include_modules Exceptable, :authenticatable, :confirmable, :trackable, :timeoutable
|
||||
assert_include_modules Exceptable, :authenticatable, :confirmable, :trackable
|
||||
end
|
||||
|
||||
test 'set a default value for stretches' do
|
||||
|
||||
Reference in New Issue
Block a user