refactor Topic

* move finding by username/email to User
* make SiteSetting return a range of possible post title lengths
* remove unnecessary conditions
This commit is contained in:
Gosha Arinich
2013-02-26 19:27:59 +03:00
parent 1221c393a3
commit 12d664a610
5 changed files with 25 additions and 15 deletions

View File

@ -107,4 +107,13 @@ describe SiteSetting do
end
end
describe 'topic_title_length' do
it 'returns a range of min/max topic title length' do
SiteSetting.min_topic_title_length = 1
SiteSetting.max_topic_title_length = 2
SiteSetting.topic_title_length.should == (1..2)
end
end
end