diff options
Diffstat (limited to 'spec/views/profiles/show.html.haml_spec.rb')
-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 |