GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 05e72272 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Set user data in profile link in the header

Signed-off-by: default avatarDmitriy Zaporozhets <>
parent 7facedfb
......@@ -45,7 +45,7 @@
= link_to "Profile", current_user
= link_to "Profile", current_user, class: 'profile-link', data: { user: current_user.username }
= link_to "Profile Settings", profile_path
......@@ -144,9 +144,7 @@
before { click_link 'Impersonate' }
it 'logs in as the user when impersonate is clicked' do
page.within '.sidebar-wrapper' do
expect(page.find('.sidebar-user')['data-user']).to eql(another_user.username)
expect(page.find(:css, '.header-user .profile-link')['data-user']).to eql(another_user.username)
it 'sees impersonation log out icon' do
......@@ -158,9 +156,7 @@
it 'can log out of impersonated user back to original user' do
find(:css, 'li.impersonation a').click
page.within '.sidebar-wrapper' do
expect(page.find('.sidebar-user')['data-user']).to eql(@user.username)
expect(page.find(:css, '.header-user .profile-link')['data-user']).to eql(@user.username)
it 'is redirected back to the impersonated users page in the admin after stopping' do
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment