zammad/spec/system/basic/session_takeover_spec.rb
2026-01-02 15:41:09 +02:00

23 lines
638 B
Ruby

# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
require 'rails_helper'
RSpec.describe 'Session takeover check', type: :system do
context 'when use logout action' do
let(:agent) { create(:agent) }
it 'check that all tabs have been logged out', authenticated_as: :agent do
visit '/'
# open new tab
open_window_and_switch
visit '/'
# Go back and check for session takeover message
switch_to_window_index(1)
expect(page).to have_text('A new session was created with your account. This session will be stopped to prevent a conflict.')
end
end
end