mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-09 14:58:05 -05:00
Cleaning up test helpers related to OmniAuth.
Developers should rely on OmniAuth's new testing API. Check https://github.com/intridea/omniauth/wiki/Integration-Testing for more details.
This commit is contained in:
25
test/omniauth/test_helpers_test.rb
Normal file
25
test/omniauth/test_helpers_test.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
require 'test_helper'
|
||||
|
||||
class OmniAuthTestHelpersTest < ActiveSupport::TestCase
|
||||
test "Assert that stub! raises deprecation error" do
|
||||
assert_raises Devise::OmniAuth::TestHelpers::DeprecationError do
|
||||
Devise::OmniAuth::TestHelpers.stub!
|
||||
end
|
||||
end
|
||||
|
||||
test "Assert that reset_stubs! raises deprecation error" do
|
||||
assert_raises Devise::OmniAuth::TestHelpers::DeprecationError do
|
||||
Devise::OmniAuth::TestHelpers.reset_stubs!
|
||||
end
|
||||
end
|
||||
|
||||
test "Assert that short_circuit_authorizers! warns about deprecation" do
|
||||
Devise::OmniAuth::TestHelpers.short_circuit_authorizers!
|
||||
assert ::OmniAuth.config.test_mode
|
||||
end
|
||||
|
||||
test "Assert that unshort_circuit_authorizers! warns about deprecation" do
|
||||
Devise::OmniAuth::TestHelpers.unshort_circuit_authorizers!
|
||||
assert ! ::OmniAuth.config.test_mode
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user