Add subtype to topics to classify private messages

This commit is contained in:
Neil Lalonde
2013-04-16 16:56:18 -04:00
parent 2b5a2b5fce
commit 3b6aeb14c7
16 changed files with 223 additions and 43 deletions

View File

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