mirror of
https://github.com/neocities/neocities.git
synced 2025-07-21 18:16:07 +02:00
fixes for tests
This commit is contained in:
parent
88f419ce67
commit
498f29bfa2
3 changed files with 5 additions and 10 deletions
|
@ -112,7 +112,7 @@ describe Site do
|
|||
describe 'suggestions' do
|
||||
it 'should return suggestions for tags' do
|
||||
site = Fabricate :site, new_tags_string: 'vegetables'
|
||||
Site::SUGGESTIONS_LIMIT.times { Fabricate :site, new_tags_string: 'vegetables' }
|
||||
Site::SUGGESTIONS_LIMIT.times { Fabricate :site, new_tags_string: 'vegetables', site_changed: true }
|
||||
|
||||
_(site.suggestions.length).must_equal Site::SUGGESTIONS_LIMIT
|
||||
|
||||
|
@ -122,10 +122,10 @@ describe Site do
|
|||
|
||||
site = Fabricate :site, new_tags_string: 'gardening'
|
||||
(Site::SUGGESTIONS_LIMIT-5).times {
|
||||
Fabricate :site, new_tags_string: 'gardening', views: Site::SUGGESTIONS_VIEWS_MIN
|
||||
Fabricate :site, new_tags_string: 'gardening', views: Site::SUGGESTIONS_VIEWS_MIN, site_changed: true
|
||||
}
|
||||
|
||||
_(site.suggestions.length).must_equal(Site::SUGGESTIONS_LIMIT - 5)
|
||||
_(site.suggestions.length).must_equal(Site::SUGGESTIONS_LIMIT)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue