refactor validators

add a new setting for min pm body length
use that setting for flags
scale entropy check down for pms
This commit is contained in:
Sam
2013-06-13 18:18:17 +10:00
parent b027f7d8da
commit f7de9f17d5
12 changed files with 91 additions and 23 deletions

View File

@ -365,8 +365,14 @@ describe Post do
end
it 'validates' do
Fabricate.build(:post, post_args).should be_valid
context 'validation' do
it 'validates our default post' do
Fabricate.build(:post, post_args).should be_valid
end
it 'treate blank posts as invalid' do
Fabricate.build(:post, raw: "").should_not be_valid
end
end
context "raw_hash" do