Allow local authentication with LOCAL_AUTHENTICATION=1
You can touch `tmp/local-auth.txt` to persist this setting.
This commit is contained in:
@@ -15,6 +15,24 @@ class ControllerAuthenticationTest < ActionDispatch::IntegrationTest
|
||||
assert_redirected_to Launchpad.login_url(product: true, account: Account.sole)
|
||||
end
|
||||
|
||||
test "local auth, access without an account slug redirects to launchpad" do
|
||||
integration_session.default_url_options[:script_name] = "" # no tenant
|
||||
|
||||
with_local_auth do
|
||||
get cards_path
|
||||
end
|
||||
|
||||
assert_redirected_to Launchpad.login_url(product: true)
|
||||
end
|
||||
|
||||
test "local auth, access with an account slug but no session redirects to new session" do
|
||||
with_local_auth do
|
||||
get cards_path
|
||||
end
|
||||
|
||||
assert_redirected_to new_session_path
|
||||
end
|
||||
|
||||
test "access with an account slug and a session allows functional access" do
|
||||
sign_in_as :kevin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user