2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2020-02-19 11:43:58 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2021-07-22 14:03:33 +00:00
|
|
|
RSpec.describe 'Profile > Devices', type: :system do
|
2021-08-17 12:10:02 +00:00
|
|
|
subject!(:device) { create(:user_device, user_id: User.find_by(login: 'admin@example.com').id) }
|
2020-02-19 11:43:58 +00:00
|
|
|
|
|
|
|
it 'allows to remove device' do
|
|
|
|
visit 'profile/devices'
|
|
|
|
|
|
|
|
within(:active_content) do
|
|
|
|
find('td', text: device.name)
|
|
|
|
.ancestor('tr')
|
|
|
|
.find('.settings-list-control')
|
|
|
|
.click
|
|
|
|
end
|
|
|
|
|
2020-08-26 12:31:33 +00:00
|
|
|
expect(page).to have_no_css('td', text: device.name)
|
2020-02-19 11:43:58 +00:00
|
|
|
end
|
|
|
|
end
|