Revision 5c02935a
Added by Dominic Cleal about 8 years ago
test/unit/sso.rb | ||
---|---|---|
available = SSO.get_available(Object.new)
|
||
assert available.present?
|
||
end
|
||
|
||
def test_register_method
|
||
assert_difference 'SSO.all.count', 1 do
|
||
SSO.register_method(DummyMethod)
|
||
end
|
||
assert_includes SSO.all, DummyMethod
|
||
ensure
|
||
SSO.deregister_method(DummyMethod)
|
||
end
|
||
|
||
def test_deregister_method
|
||
SSO.register_method(DummyMethod)
|
||
assert_difference 'SSO.all.count', -1 do
|
||
SSO.deregister_method(DummyMethod)
|
||
end
|
||
refute_includes SSO.all, DummyMethod
|
||
end
|
||
end
|
Also available in: Unified diff
fixes #14291 - replace integration test logins with SSO
Replace the loading and form-filling on the user login page with a
test-only SSO method, which automatically logs in the test user on
every request. This uses a cookie sent in the request to specify the
user.