27 lines
668 B
Ruby
27 lines
668 B
Ruby
require "test_helper"
|
|
|
|
class ControllerAuthenticationTest < ActionDispatch::IntegrationTest
|
|
test "access without an account slug redirects to new session" do
|
|
integration_session.default_url_options[:script_name] = "" # no tenant
|
|
|
|
get cards_path
|
|
|
|
assert_response :success
|
|
assert_dom "h2", text: "We're migrating Fizzy authentication"
|
|
end
|
|
|
|
test "access with an account slug but no session redirects to new session" do
|
|
get cards_path
|
|
|
|
assert_redirected_to new_session_path
|
|
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
|