Dan Schultzer
be2e17841e
Separate Devise test methods from Devise
2017-04-29 10:24:22 -07:00
Rafael Mendonça França
0591d92f53
Move the version check to the lib folder
...
Closes #4514 .
Fixes #4513 .
2017-04-29 10:12:51 -07:00
Rafael Mendonça França
94c6d5f5cc
Remove deprecation on _changed? methods
2017-04-28 16:05:39 -07:00
Rafael França
4beeca46c4
Merge pull request #4512 from jcoyne/rails-5.1
...
Rails 5.1
2017-04-28 15:16:35 -07:00
Matthew Rudy Jacobs
7c4e8c8d17
Rails 5.1 requires ActionController::TestRequest to have a controller class
...
Pass it in as an anonymous class
2017-04-28 10:51:27 -05:00
Carlos Antonio da Silva
ce071502ee
Display unconfirmed email when using reconfirmable and email changed notification
...
Otherwise we'd be mistakenly displaying the original email in the
message (which is the same we're sending the message to).
Also tweak the messaging a bit in this case, to show that the email "is
being changed" (the change hasn't taken effect yet).
Related to #4455 .
2017-03-15 11:47:47 -03:00
Carlos Antonio da Silva
0c5d78e31c
Merge pull request #4456 from victor-am/hotfix_absent_new_password_values
...
Fix absent password params from Password#update
Closes #4397 .
2017-03-13 19:41:46 -03:00
victor-am
60dc4be8c1
Fix absent password params from Password#update
...
Related to issue #4397
This hotfix adds a string coercion to new_password paramenters when
trying to reset an user's password.
Before that, when a user submitted a password recovery form with the
new_password and new_password_confirmation params as nil, Devise would
sign in the user with a success notice but without actually changing the
password.
2017-03-10 14:29:25 -03:00
Carlos Antonio da Silva
c605758800
Add some basic tests for the email changed notification
2017-03-10 09:10:57 -03:00
Carlos Antonio da Silva
2135ae5e5e
Change email_change => email_changed notification
...
This better indicates what the setting is for, and when it's supposed to
be triggered.
We might eventually deprecate the existing password_change on in favor
of password_changed.
2017-03-10 08:56:34 -03:00
Carlos Antonio da Silva
8387cc9474
When using reconfirmable, notify the original email about the change right away
...
Do not wait for the email change to be confirmed by the "unconfirmed
email" with reconfirmable: notify the original email right away.
2017-03-06 17:07:55 -03:00
Carlos Antonio da Silva
70eb18d766
Notify original user email when the email changes
...
This adds a new setting `send_email_change_notification` which will
send an email to the original user email when their email is updated to
a new one.
It doesn't take into account the reconfirmable setting yet, it will be
added next, so that if confirmable is included and reconfirmable is
being used, the email will be triggered when the email change is
requested, not when confirmed (e.g when we store the email in
`unconfirmed_email`, not when it's later copied to `email` when that is
confirmed).
2017-03-06 17:04:26 -03:00
Carlos Antonio da Silva
c76f0e59b7
Use assert_nil to prevent minitest warnings
2017-03-02 08:12:46 -03:00
Matthew Rudy Jacobs
6fc6a28e3b
Avoid the assert_equal nil deprecation warning
2017-02-26 22:05:15 +00:00
Matthew Rudy Jacobs
6bc2db4567
Fix Omniauth config tests
2017-02-26 21:52:51 +00:00
Marc G Gauthier
8ee01fc10b
Fix a minor typo in specs
...
There is nothing much to this one, it's in the test description so it shouldn't impact a thing and will make this line more greppable.
2016-08-11 09:56:45 +02:00
Frederik Wille
08374f1d33
fix test
2016-07-18 09:24:46 +02:00
Frederik Wille
a5f8cd9d32
simplify test
2016-07-18 09:00:32 +02:00
Frederik Wille
65d8e94ed9
add test
...
in the test we need to declare a subclass of ``Devise::Mailer`` to give
a block to mail call inside of method which has a corresponding view
template
there are propably better ways to test this, but this is pretty much the
use case for passing a block
2016-07-15 12:22:12 +02:00
Lucas Mazza
fe10a5b17a
Fix test typo and expand test cases for Rememberable#rememberable_value.
...
Closes #4157
2016-06-27 17:08:52 -03:00
Lucas Mazza
22784cb55a
Remove ActiveRecord::Migration inheritance deprecation warning.
2016-06-27 16:50:26 -03:00
Lucas Mazza
656720583f
Remove assert_nothing_raised deprecated usage.
2016-06-27 16:48:12 -03:00
Kris Handley
0c991af985
Fix Rails 5 env deprecation warning
...
Full warning ```DEPRECATION WARNING: env is deprecated and will be removed from Rails 5.1```
2016-06-18 14:20:08 +01:00
Arne Zeising
ac702843dd
Change behavior to skip reconfirmation after creating a record with #save called in callback ( #4125 )
...
https://github.com/plataformatec/devise/pull/4125
2016-06-13 17:57:24 -03:00
Kostas Diamantis
4015488b90
Add missing support of Rails.application.config.action_controller.relative_url_root ( #4146 )
...
* Add Devise::FailureApp#{relative_url_root, relative_url_root?}
Also support missing action_controller.relative_url_root configuration.
* Dry assignment of relative_url_root
Also this commit adds support for
Rails.application.config.action_controller.relative_url_root
2016-06-13 15:46:43 -03:00
Lucas Mazza
cccc137714
Merge pull request #4139 from shinyaK14/public_file_server
...
Add public_file_server setting for Rails5
2016-06-13 11:34:04 -03:00
Tim Krajcar
a0232cf763
Implement Devise::Models::Authenticatable#inspect, re-using #serializable_hash.
2016-06-03 15:54:58 -07:00
Shinya Kitamura
57980ba82a
Add public_file_server setting for Rails5
2016-06-01 14:44:35 +08:00
Stefan Botzenhart
cbbe932ee2
Fix authenticated engine routes ( #4081 )
...
Fix infinite loop in authenticated engine routes in Rails 5
https://github.com/plataformatec/devise/issues/3705
2016-05-21 11:55:56 -03:00
Lucas Mazza
7b000390a0
Add Devise::Test::IntegrationHelpers.
2016-05-15 19:36:41 -03:00
Lucas Mazza
3f3ec236bb
Move Devise::TestHelpers to Devise::Test::ControllerHelpers.
2016-05-15 19:36:41 -03:00
Ralin Chimev
9caf07dd4f
Fix overwriting the remember_token when a valid one already exists ( #4101 )
...
The remember_token should not get overwritten when a user is
signing in and a valid token already exists.
Fixes #3950 .
2016-05-15 11:48:12 -03:00
Ulisses Almeida
2044fffa25
Deprecate the bypass option of sign_in ( #4078 )
...
The sign_in method permits the bypass option
that ignore the others options used. This behavior
has lead some users to a misconfusion what the
method really does.
This change deprecate the bypass option in favor
of a method that only does the sign in with bypass.
Closes #3981
2016-05-15 11:46:48 -03:00
Matt Yanchek
85bcbdf18b
Set minimum password length for edit and new views ( #4068 )
...
* Set minimum password length for edit and new views
* Update edit.html.erb
* Update registerable_test.rb
2016-05-05 17:16:41 -03:00
Lucas Mazza
e79201aef8
Remove deprecated ParameterSanitizer API.
2016-05-03 18:32:47 -03:00
Lucas Mazza
a2498074f1
Replace custom Array assertion with assert_equal.
2016-05-03 14:18:35 -03:00
Lucas Mazza
536279b05b
Replace homemade assert_not matcher in favor of refute.
2016-05-03 13:57:10 -03:00
Lucas Mazza
74ab3e9a05
Remove references to ActiveSupport::OrderedHash.
...
We no longer support legacy rubies where hashes aren't ordered, so we don't need
to use this class for it.
2016-05-03 13:48:42 -03:00
Ulisses Almeida
81869de9c5
Only set raise_in_transactional_callbacks for Rails 4.2
...
* Only set for active record orm.
* Only set for Rails versions that supports the config.
2016-05-02 23:22:51 -03:00
Ulisses Almeida
f6301c08f6
Add raise_in_transactional_callbacks to true
...
Using a rails app without this config generates a rails
warning, since it will be the new default. Let's udpate it.
2016-05-02 22:41:51 -03:00
ALLEN WANG QIANG
78bbf6dcc4
Send on create confirmation email after commit ( #4064 )
...
Call send_on_create_confirmation_instructions in after_commit instead of after_create, I think this is no harm in general and it makes things like async job work.
Fix #4062
2016-05-02 21:32:14 -03:00
Ulisses Almeida
1ff64fbbd3
Merge pull request #4076 from f3ndot/issue-4072-unlock-strategy-enabled-bug
...
Fix strategy checking in #unlock_strategy_enabled? for :none and undefined strategies
2016-05-02 21:28:49 -03:00
Lucas Mazza
13285d7ef3
Remove a few Ruby syntax warnings from the test suite.
2016-05-02 10:47:05 -03:00
Justin Bull
7346ce709a
🪲 Fix strategy checking in #unlock_strategy_enabled? for :none and undefined strategies
...
A bug that if the unlock strategy was set to `:both`, it would return true for all & any inputs
See #4072
2016-05-01 13:56:12 -04:00
Ulisses Almeida
1ddca80cee
Set the new default of sign_out_via config
2016-05-01 12:44:40 -03:00
Ulisses Almeida
896521be73
Se the new default for skip_session_storage config
2016-05-01 12:44:40 -03:00
Ulisses Almeida
6e419ce821
Set the new default for reconfirmable config
2016-05-01 12:44:40 -03:00
Ulisses Almeida
93df02f601
Set the new default for strip_whitespace_keys config
2016-05-01 12:44:40 -03:00
byzg
357ce9c3b5
Humanize authentication keys in failure flash message ( #4014 )
...
Humanize and translates the authentication keys in failure flash message.
2016-04-26 11:17:03 -03:00
kimgb
830d3e86ee
updated email_regexp and added test cases ( #4001 )
...
Add a more permissive default e-mail regex.
2016-04-26 11:13:07 -03:00