FIX: when allow_uncategorized_topics was false, PMs can not be created

This commit is contained in:
Sam
2013-10-25 09:33:18 +11:00
parent d149066ac6
commit 4929c5db71
2 changed files with 9 additions and 3 deletions

View File

@@ -185,6 +185,11 @@ describe Topic do
topic.errors[:category_id].should be_present
end
it "allows PMs" do
topic = Fabricate.build(:topic, category: nil, archetype: Archetype.private_message)
topic.should be_valid
end
it 'passes for topics with a category' do
Fabricate.build(:topic, category: Fabricate(:category)).should be_valid
end