diff --git a/spec/models/user_profile_spec.rb b/spec/models/user_profile_spec.rb
index ee05902c3ec..98545ffabe9 100644
--- a/spec/models/user_profile_spec.rb
+++ b/spec/models/user_profile_spec.rb
@@ -114,19 +114,19 @@ describe UserProfile do
describe 'bio excerpt emojis' do
let(:user) { Fabricate(:user) }
+ let(:upload) { Fabricate(:upload) }
before do
- CustomEmoji.create!(name: 'test', upload_id: 1)
+ CustomEmoji.create!(name: 'test', upload: upload)
Emoji.clear_cache
- user.user_profile.bio_raw = "hello :test: :woman_scientist:t5: 🤔"
- user.user_profile.save
- user.user_profile.reload
+ user.user_profile.update!(
+ bio_raw: "hello :test: :woman_scientist:t5: 🤔"
+ )
end
it 'supports emoji images' do
-
- expect(user.user_profile.bio_excerpt(500, keep_emoji_images: true)).to eq("hello ")
+ expect(user.user_profile.bio_excerpt(500, keep_emoji_images: true)).to eq("hello ")
end
end