Commit 9bfda843c75539f2ccc0bfbb05a0e32ec866705d
1 parent
79274989
Exists in
master
and in
29 other branches
ActionItem352: adding proper tests for name and identifier indexing in profile
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1859 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
10 additions
and
0 deletions
Show diff stats
test/unit/profile_test.rb
... | ... | @@ -519,6 +519,16 @@ class ProfileTest < Test::Unit::TestCase |
519 | 519 | assert_includes TestingExtraDataForIndex.find_by_contents('sample'), profile |
520 | 520 | end |
521 | 521 | |
522 | + should 'index profile identifier for searching' do | |
523 | + p = Profile.create!(:identifier => 'testprofile', :name => 'Interesting Profile') | |
524 | + assert_includes Profile.find_by_contents('testprofile'), p | |
525 | + end | |
526 | + | |
527 | + should 'index profile name for searching' do | |
528 | + p = Profile.create!(:identifier => 'testprofile', :name => 'Interesting Profile') | |
529 | + assert_includes Profile.find_by_contents('interesting'), p | |
530 | + end | |
531 | + | |
522 | 532 | private |
523 | 533 | |
524 | 534 | def assert_invalid_identifier(id) | ... | ... |