FEATURE: reply as new message to the same recipients

This commit is contained in:
Leo McArdle
2016-11-29 17:59:42 +00:00
committed by Guo Xiang Tan
parent c01cee4aa6
commit c76f6856ea
10 changed files with 99 additions and 10 deletions

View File

@ -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