mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 11:14:42 +08:00
FEATURE: Navigate to an approved queued topic from the review queue. (#12841)
Admins can visit an approved queued topic from the review queue by clicking their title. We no longer store the created post and topic ids in the reviewable's payload object. Instead, we set the `topic_id` and `target_id` attributes.
This commit is contained in:
@ -61,7 +61,7 @@ RSpec.describe ReviewableQueuedPost, type: :model do
|
||||
expect(result.created_post.custom_fields['hello']).to eq('world')
|
||||
expect(result.created_post_topic).to eq(topic)
|
||||
expect(result.created_post.user).to eq(reviewable.created_by)
|
||||
expect(reviewable.payload['created_post_id']).to eq(result.created_post.id)
|
||||
expect(reviewable.target_id).to eq(result.created_post.id)
|
||||
|
||||
expect(Topic.count).to eq(topic_count)
|
||||
expect(Post.count).to eq(post_count + 1)
|
||||
@ -183,8 +183,8 @@ RSpec.describe ReviewableQueuedPost, type: :model do
|
||||
expect(result.created_post).to be_valid
|
||||
expect(result.created_post_topic).to be_present
|
||||
expect(result.created_post_topic).to be_valid
|
||||
expect(reviewable.payload['created_post_id']).to eq(result.created_post.id)
|
||||
expect(reviewable.payload['created_topic_id']).to eq(result.created_post_topic.id)
|
||||
expect(reviewable.target_id).to eq(result.created_post.id)
|
||||
expect(reviewable.topic_id).to eq(result.created_post_topic.id)
|
||||
|
||||
expect(Topic.count).to eq(topic_count + 1)
|
||||
expect(Post.count).to eq(post_count + 1)
|
||||
|
Reference in New Issue
Block a user