mirror of
https://github.com/discourse/discourse.git
synced 2025-04-26 00:04:33 +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(
|
reviewable = ReviewableQueuedPost.new(
|
||||||
created_by: @user,
|
created_by: @user,
|
||||||
payload: { raw: @args[:raw] },
|
payload: { raw: @args[:raw], tags: @args[:tags] },
|
||||||
topic_id: @args[:topic_id],
|
topic_id: @args[:topic_id],
|
||||||
reviewable_by_moderator: true
|
reviewable_by_moderator: true
|
||||||
)
|
)
|
||||||
|
@ -268,7 +268,8 @@ describe NewPostManager do
|
|||||||
manager = NewPostManager.new(
|
manager = NewPostManager.new(
|
||||||
topic.user,
|
topic.user,
|
||||||
raw: 'to the handler I say enqueue me!',
|
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
|
result = manager.perform
|
||||||
@ -280,6 +281,7 @@ describe NewPostManager do
|
|||||||
expect(reviewable.reviewable_scores).to be_present
|
expect(reviewable.reviewable_scores).to be_present
|
||||||
expect(reviewable.score).to eq(20.5)
|
expect(reviewable.score).to eq(20.5)
|
||||||
expect(reviewable.reviewable_by_moderator?).to eq(true)
|
expect(reviewable.reviewable_by_moderator?).to eq(true)
|
||||||
|
expect(reviewable.payload['tags']).to eq(['hello', 'world'])
|
||||||
expect(result.action).to eq(:enqueued)
|
expect(result.action).to eq(:enqueued)
|
||||||
expect(result).to be_success
|
expect(result).to be_success
|
||||||
expect(result.pending_count).to eq(1)
|
expect(result.pending_count).to eq(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user