diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-19 14:21:25 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-19 14:21:25 +0300 |
commit | ff97afdd589b0c3dd93db9eca83b13a09a704a2e (patch) | |
tree | 896a5b2389b0eb80b31e499b3efdac352e1fed5b /spec | |
parent | 7794a5157ca3e29826e344c90e23601c9bc9e357 (diff) | |
parent | aa2e2cacb46485eae1356ba9cf684bbf2bb41d42 (diff) |
Merge branch '33461-display-user-id' into 'master'
Display own user id in account settings pages
Closes #33461
See merge request !12141
Diffstat (limited to 'spec')
-rw-r--r-- | spec/views/profiles/show.html.haml_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/views/profiles/show.html.haml_spec.rb b/spec/views/profiles/show.html.haml_spec.rb new file mode 100644 index 00000000000..e89a8cb9626 --- /dev/null +++ b/spec/views/profiles/show.html.haml_spec.rb @@ -0,0 +1,19 @@ +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 |