mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Improve registrar area linked user switch
- Introduce profile - Move linked users to profile - Use PUT #599
This commit is contained in:
parent
bd78c9d5c8
commit
e2ebe0aa84
16 changed files with 248 additions and 73 deletions
18
spec/features/registrar/linked_users_spec.rb
Normal file
18
spec/features/registrar/linked_users_spec.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.feature 'Registrar area linked users', settings: false do
|
||||
given!(:current_user) { create(:api_user_with_unlimited_balance, id: 1, identity_code: 'test') }
|
||||
given!(:linked_user) { create(:api_user_with_unlimited_balance, id: 2, identity_code: 'test',
|
||||
username: 'new-user-name') }
|
||||
|
||||
background do
|
||||
Setting.registrar_ip_whitelist_enabled = false
|
||||
sign_in_to_registrar_area(user: current_user)
|
||||
end
|
||||
|
||||
scenario 'switches current user to a linked one' do
|
||||
visit registrar_profile_path
|
||||
click_link_or_button 'switch-current-user-2-btn'
|
||||
expect(page).to have_text('You are now signed in as a user "new-user-name"')
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue