mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 07:37:55 +08:00
FEATURE: reply as new message to the same recipients
This commit is contained in:

committed by
Guo Xiang Tan

parent
c01cee4aa6
commit
c76f6856ea
@ -218,6 +218,7 @@ describe Guardian do
|
||||
describe 'can_reply_as_new_topic' do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:topic) { Fabricate(:topic) }
|
||||
let(:private_message) { Fabricate(:private_message_topic) }
|
||||
|
||||
it "returns false for a non logged in user" do
|
||||
expect(Guardian.new(nil).can_reply_as_new_topic?(topic)).to be_falsey
|
||||
@ -235,6 +236,10 @@ describe Guardian do
|
||||
it "returns true for a trusted user" do
|
||||
expect(Guardian.new(user).can_reply_as_new_topic?(topic)).to be_truthy
|
||||
end
|
||||
|
||||
it "returns true for a private message" do
|
||||
expect(Guardian.new(user).can_reply_as_new_topic?(private_message)).to be_truthy
|
||||
end
|
||||
end
|
||||
|
||||
describe 'can_see_post_actors?' do
|
||||
|
Reference in New Issue
Block a user