debian-mirror-gitlab/spec/views/profiles/show.html.haml_spec.rb

23 lines
522 B
Ruby
Raw Normal View History

2019-12-21 20:55:43 +05:30
# frozen_string_literal: true
2017-09-10 17:25:29 +05:30
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)
2019-12-26 22:10:19 +05:30
allow(view).to receive(:experiment_enabled?)
2017-09-10 17:25:29 +05:30
end
context 'when the profile page is opened' do
it 'displays the correct elements' do
render
2019-09-04 21:01:54 +05:30
expect(rendered).to have_field('user_name', with: user.name)
expect(rendered).to have_field('user_id', with: user.id)
2017-09-10 17:25:29 +05:30
end
end
end