Use JSON.generate call in push update worker (#38208)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2026-03-16 13:55:53 +00:00
1 parent 21c27eb3af
commit f9b2dffaa8
2 files changed
+14 -5

No files matched your search

+11 -2
View File
@@ -15,7 +15,7 @@ RSpec.describe PushUpdateWorker do
context 'with valid records' do
let(:account) { Fabricate :account }
let(:status) { Fabricate :status }
let(:status) { Fabricate :status, text: 'Test Post' }
before { allow(redis).to receive(:publish) }
@@ -25,7 +25,16 @@ RSpec.describe PushUpdateWorker do
expect(redis)
.to have_received(:publish)
.with(redis_key, anything)
.with(
redis_key,
match_json_values(
event: 'update',
payload: include(
created_at: status.created_at.iso8601(3),
content: eq('<p>Test Post</p>')
)
)
)
end
def redis_key