BUGFIX: PMs could be created with a category

BUGFIX: hide category column when displaying the list of private messages
This commit is contained in:
Régis Hanol
2014-01-24 12:57:48 +01:00
parent 0634f3320a
commit 245bc19379
5 changed files with 28 additions and 6 deletions

View File

@ -313,13 +313,17 @@ describe PostCreator do
PostCreator.create(user, title: 'hi there welcome to my topic',
raw: "this is my awesome message @#{unrelated.username_lower}",
archetype: Archetype.private_message,
target_usernames: [target_user1.username, target_user2.username].join(','))
target_usernames: [target_user1.username, target_user2.username].join(','),
category: 1)
end
it 'acts correctly' do
post.topic.archetype.should == Archetype.private_message
post.topic.topic_allowed_users.count.should == 3
# PMs can't have a category
post.topic.category.should be_nil
# does not notify an unrelated user
unrelated.notifications.count.should == 0
post.topic.subtype.should == TopicSubtype.user_to_user