summaryrefslogtreecommitdiff
path: root/spec/views
diff options
context:
space:
mode:
authorRiccardo Padovani <riccardo@rpadovani.com>2017-06-15 00:16:22 +0200
committerRiccardo Padovani <riccardo@rpadovani.com>2017-06-15 00:16:22 +0200
commit08141295614fb607e2ba46d20be4e40de0bf6216 (patch)
treee082079f6908600756ca5c5b114268ece45f8678 /spec/views
parent4c2df7d43cc960010ae10651207d728b450c07be (diff)
downloadgitlab-ce-08141295614fb607e2ba46d20be4e40de0bf6216.tar.gz
#33641: add spec for profile page
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/profiles/show.html.haml_spec.rb18
1 files changed, 18 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..497e31be141
--- /dev/null
+++ b/spec/views/profiles/show.html.haml_spec.rb
@@ -0,0 +1,18 @@
+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