mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
25 lines
No EOL
798 B
Ruby
25 lines
No EOL
798 B
Ruby
require 'test_helper'
|
|
|
|
class RegistrarAreaProtectedAreaTest < ApplicationSystemTestCase
|
|
def test_anonymous_user_is_asked_to_authenticate_when_navigating_to_protected_area
|
|
visit registrar_domains_url
|
|
assert_text 'You need to sign in before continuing'
|
|
assert_current_path new_registrar_user_session_path
|
|
end
|
|
|
|
def test_authenticated_user_can_access_protected_area
|
|
sign_in users(:api_bestnames)
|
|
visit registrar_domains_url
|
|
|
|
assert_no_text 'You need to sign in before continuing'
|
|
assert_current_path registrar_domains_path
|
|
end
|
|
|
|
def test_authenticated_user_is_not_asked_to_authenticate_again
|
|
sign_in users(:api_bestnames)
|
|
visit new_registrar_user_session_url
|
|
|
|
assert_text 'You are already signed in'
|
|
assert_current_path registrar_root_path
|
|
end
|
|
end |