session_invalid_spec.rb 578 B

12345678910111213141516
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Session invalid detection', authenticated_as: true, authentication_type: :form, type: :system do
  4. context 'when session will be deleted on the backend' do
  5. it 'redirects to login page after next request' do
  6. # Delete the session on backend
  7. SessionHelper.destroy(SessionHelper.list.first.id)
  8. click('.menu-item[href="#ticket/view"]')
  9. expect(page).to have_text('The session is no longer valid. Please log in again.')
  10. end
  11. end
  12. end