Commit ff97afdd authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch '33461-display-user-id' into 'master'

Display own user id in account settings pages

Closes #33461

See merge request !12141
parents 7794a515 aa2e2cac
......@@ -42,10 +42,17 @@
- if current_user.ldap_user?
Some options are unavailable for LDAP accounts
.col-lg-9
.form-group
= f.label :name, class: "label-light"
= f.text_field :name, class: "form-control", required: true
%span.help-block Enter your name, so people you know can recognize you.
.row
.form-group.col-md-9
= f.label :name, class: "label-light"
= f.text_field :name, class: "form-control", required: true
%span.help-block Enter your name, so people you know can recognize you.
.form-group.col-md-3
= f.label :id, class: 'label-light' do
User ID
= f.text_field :id, class: 'form-control', readonly: true
.form-group
= f.label :email, class: "label-light"
......
---
title: Display own user id in account settings page
merge_request: 12141
author: Riccardo Padovani
require 'spec_helper'
describe 'profiles/show' do
let(:user) { create(:user) }
before do
assign(:user, user)
allow(controller).to receive(:current_user).and_return(user)
end
context 'when the profile page is opened' do
it 'displays the correct elements' do
render
expect(rendered).to have_field('user_name', user.name)
expect(rendered).to have_field('user_id', user.id)
end
end
end
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