mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 05:13:45 +08:00
DEV: Make rubocop happy.
This commit is contained in:
parent
2923abdec7
commit
53082e011a
|
@ -911,11 +911,13 @@ describe PostCreator do
|
||||||
fab!(:target_user2) { Fabricate(:moderator) }
|
fab!(:target_user2) { Fabricate(:moderator) }
|
||||||
fab!(:unrelated_user) { Fabricate(:user) }
|
fab!(:unrelated_user) { Fabricate(:user) }
|
||||||
let(:post) do
|
let(:post) do
|
||||||
PostCreator.create!(user, title: 'hi there welcome to my topic',
|
PostCreator.create!(user,
|
||||||
raw: "this is my awesome message @#{unrelated_user.username_lower}",
|
title: 'hi there welcome to my topic',
|
||||||
archetype: Archetype.private_message,
|
raw: "this is my awesome message @#{unrelated_user.username_lower}",
|
||||||
target_usernames: [target_user1.username, target_user2.username].join(','),
|
archetype: Archetype.private_message,
|
||||||
category: 1)
|
target_usernames: [target_user1.username, target_user2.username].join(','),
|
||||||
|
category: 1
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'acts correctly' do
|
it 'acts correctly' do
|
||||||
|
@ -949,8 +951,10 @@ describe PostCreator do
|
||||||
|
|
||||||
# if an admin replies they should be added to the allowed user list
|
# if an admin replies they should be added to the allowed user list
|
||||||
admin = Fabricate(:admin)
|
admin = Fabricate(:admin)
|
||||||
PostCreator.create!(admin, raw: 'hi there welcome topic, I am a mod',
|
PostCreator.create!(admin,
|
||||||
topic_id: post.topic_id)
|
raw: 'hi there welcome topic, I am a mod',
|
||||||
|
topic_id: post.topic_id
|
||||||
|
)
|
||||||
|
|
||||||
post.topic.reload
|
post.topic.reload
|
||||||
expect(post.topic.topic_allowed_users.where(user_id: admin.id).count).to eq(1)
|
expect(post.topic.topic_allowed_users.where(user_id: admin.id).count).to eq(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user