mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Add subtype to topics to classify private messages
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
require 'spec_helper'
|
||||
require 'system_message'
|
||||
require 'topic_subtype'
|
||||
|
||||
describe SystemMessage do
|
||||
|
||||
@ -20,6 +21,10 @@ describe SystemMessage do
|
||||
topic.should be_private_message
|
||||
end
|
||||
|
||||
it 'should have the correct topic subtype' do
|
||||
topic.subtype.should == TopicSubtype.system_message
|
||||
end
|
||||
|
||||
it 'should be visible by the user' do
|
||||
topic.allowed_users.include?(user).should be_true
|
||||
end
|
||||
|
Reference in New Issue
Block a user