diff --git a/spec/features/registrar/current_user/switch_spec.rb b/spec/features/registrar/user_switch_spec.rb similarity index 81% rename from spec/features/registrar/current_user/switch_spec.rb rename to spec/features/registrar/user_switch_spec.rb index a4c19bcba..0927a908a 100644 --- a/spec/features/registrar/current_user/switch_spec.rb +++ b/spec/features/registrar/user_switch_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.feature 'Registrar area current user switch', settings: false do +RSpec.feature 'Registrar area user switch', settings: false do given!(:current_user) { create(:api_user, id: 1, identity_code: 'test') } given!(:new_user) { create(:api_user, id: 2, identity_code: 'test', username: 'new-user-name') } @@ -8,7 +8,7 @@ RSpec.feature 'Registrar area current user switch', settings: false do sign_in_to_registrar_area(user: current_user) end - it 'switches current user' do + scenario 'successful user switch' do visit registrar_root_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"')