gitlab-org--gitlab-foss/spec/views/profiles/show.html.haml_spec.rb
Heinrich Lee Yu 96ed5a8bd7 Upgrade to Capybara 3
Fix whitespace in specs because normalize_ws is slightly
different from Capybara 2 behavior
2019-06-12 18:40:18 +08:00

19 lines
442 B
Ruby

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', with: user.name)
expect(rendered).to have_field('user_id', with: user.id)
end
end
end