redirects_spec.rb 469 B

123456789101112131415161718192021222324
  1. require 'rails_helper'
  2. RSpec.describe 'Unauthenticated redirect', type: :system, authenticated_as: false do
  3. it 'Sessions' do
  4. visit 'system/sessions'
  5. expect_current_route 'login'
  6. end
  7. it 'Profile' do
  8. visit 'profile/linked'
  9. expect_current_route 'login'
  10. end
  11. it 'Ticket' do
  12. visit 'ticket/zoom/1'
  13. expect_current_route 'login'
  14. end
  15. it 'Not existing route' do
  16. visit 'not_existing'
  17. expect_current_route 'not_existing'
  18. end
  19. end