Commit 3cf76cdeeb58b44e5ed1d3c86cb598b679c8bbc3
1 parent
637facb7
Exists in
master
and in
23 other branches
ActionItem253: fixing test
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1735 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
test/unit/environment_finder_test.rb
| 1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
| 2 | 2 | ||
| 3 | class EnvironmentFinderTest < ActiveSupport::TestCase | 3 | class EnvironmentFinderTest < ActiveSupport::TestCase |
| 4 | + | ||
| 5 | + all_fixtures | ||
| 4 | 6 | ||
| 5 | should 'find articles' do | 7 | should 'find articles' do |
| 6 | person = create_user('teste').person | 8 | person = create_user('teste').person |
| @@ -22,11 +24,10 @@ class EnvironmentFinderTest < ActiveSupport::TestCase | @@ -22,11 +24,10 @@ class EnvironmentFinderTest < ActiveSupport::TestCase | ||
| 22 | end | 24 | end |
| 23 | 25 | ||
| 24 | should 'find comments' do | 26 | should 'find comments' do |
| 25 | - finder = EnvironmentFinder.new(Environment.default) | ||
| 26 | person = create_user('teste').person | 27 | person = create_user('teste').person |
| 27 | art = person.articles.build(:name => 'an article to be found'); art.save! | 28 | art = person.articles.build(:name => 'an article to be found'); art.save! |
| 28 | - comment = art.comments.build(:title => 'comment to be found', :body => 'hfyfyh', :author => person); comment.save! | ||
| 29 | - assert_includes finder.comments, comment | 29 | + comment = art.comments.build(:title => 'comment to be found', :body => 'some sample text', :author => person); comment.save! |
| 30 | + assert_includes EnvironmentFinder.new(Environment.default).comments('found'), comment | ||
| 30 | end | 31 | end |
| 31 | 32 | ||
| 32 | should 'find products' do | 33 | should 'find products' do |