2019-10-08 08:06:01 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-06-14 18:16:22 -04:00
|
|
|
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-10-28 11:05:58 -04:00
|
|
|
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
|
2017-06-15 07:38:12 -04:00
|
|
|
|
2019-04-26 11:51:05 -04:00
|
|
|
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
|