Files
fizzy/test/controllers/controller_authentication_test.rb
Stanko Krtalić 98755844a1 Remove the internal API
* Bind sessions to identities
* Remove references to the identity token
* Move email changes to identity
* Move account menu into a turbo-frame
* Create tenants from a tenanted route
2025-10-31 16:26:08 +01:00

27 lines
649 B
Ruby

require "test_helper"
class ControllerAuthenticationTest < ActionDispatch::IntegrationTest
test "access without an account slug redirects to menu" do
sign_in_as :kevin
integration_session.default_url_options[:script_name] = "" # no tenant
get cards_path
assert_redirected_to session_menu_path
end
test "access with an account slug but no session redirects to new session" do
get cards_path
assert_redirected_to new_session_path(script_name: nil)
end
test "access with an account slug and a session allows functional access" do
sign_in_as :kevin
get cards_path
assert_response :success
end
end