gitlab-org--gitlab-foss/spec/views/profiles/show.html.haml_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
528 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-06-14 18:16:22 -04:00
require 'spec_helper'
RSpec.describe 'profiles/show' do
2017-06-14 18:16:22 -04:00
let(:user) { create(:user) }
before do
assign(:user, user)
allow(controller).to receive(:current_user).and_return(user)
allow(view).to receive(:experiment_enabled?)
2017-06-14 18:16:22 -04:00
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)
2017-06-14 18:16:22 -04:00
end
end
end