Fix broken tests

This commit is contained in:
Karina Kwiatek 2021-12-28 15:09:22 +01:00
parent 07a54c473e
commit b438c89256
2 changed files with 5 additions and 3 deletions

View file

@ -100,8 +100,9 @@ EOS
describe "#answer_opengraph" do
context "sample user and answer" do
let!(:user) { FactoryBot.create(:user,
profile: {
display_name: '',
bio: 'A bunch of raccoons in a trenchcoat.',
description: 'A bunch of raccoons in a trenchcoat.'},
screen_name: 'raccoons') }
let(:answer) { FactoryBot.create(:answer,
user_id: user.id,) }

View file

@ -12,6 +12,7 @@ RSpec.describe User, type: :model do
password: 'y_u_no_secure_password?',
email: 'nice.meme@nsa.gov'
)
Profile.new(user: @user)
end
subject { @user }
@ -23,7 +24,7 @@ RSpec.describe User, type: :model do
end
it '#motivation_header has a default value' do
expect(@user.motivation_header).to match ''
expect(@user.profile.motivation_header).to match ''
end
it 'does not save an invalid screen name' do