mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 13:41:31 +08:00
FIX: Queued Posts were not saving tags properly
This commit is contained in:
parent
06e3b25d04
commit
8181ad646b
|
@ -183,7 +183,7 @@ class NewPostManager
|
|||
|
||||
reviewable = ReviewableQueuedPost.new(
|
||||
created_by: @user,
|
||||
payload: { raw: @args[:raw] },
|
||||
payload: { raw: @args[:raw], tags: @args[:tags] },
|
||||
topic_id: @args[:topic_id],
|
||||
reviewable_by_moderator: true
|
||||
)
|
||||
|
|
|
@ -268,7 +268,8 @@ describe NewPostManager do
|
|||
manager = NewPostManager.new(
|
||||
topic.user,
|
||||
raw: 'to the handler I say enqueue me!',
|
||||
title: 'this is the title of the queued post'
|
||||
title: 'this is the title of the queued post',
|
||||
tags: ['hello', 'world']
|
||||
)
|
||||
|
||||
result = manager.perform
|
||||
|
@ -280,6 +281,7 @@ describe NewPostManager do
|
|||
expect(reviewable.reviewable_scores).to be_present
|
||||
expect(reviewable.score).to eq(20.5)
|
||||
expect(reviewable.reviewable_by_moderator?).to eq(true)
|
||||
expect(reviewable.payload['tags']).to eq(['hello', 'world'])
|
||||
expect(result.action).to eq(:enqueued)
|
||||
expect(result).to be_success
|
||||
expect(result.pending_count).to eq(1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user