summaryrefslogtreecommitdiff
path: root/spec/views/profiles/show.html.haml_spec.rb
blob: e89a8cb962659e23e4f0841e943626835e2ade4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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