2020-02-19 11:43:58 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2020-06-18 11:51:25 +00:00
|
|
|
RSpec.describe 'Profile > Devices', type: :system, authenticated_as: true do
|
2020-02-19 11:43:58 +00:00
|
|
|
subject!(:device) { create(:user_device, user_id: User.find_by(login: 'master@example.com').id) }
|
|
|
|
|
|
|
|
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
|