Commit 6c88dddfe06cb947236a2b365bd37dffa7eb1436
1 parent
21942118
Exists in
master
and in
23 other branches
Fix typo, s/finger/finder/
Showing
1 changed file
with
19 additions
and
19 deletions
Show diff stats
test/functional/search_controller_test.rb
| @@ -453,10 +453,10 @@ class SearchControllerTest < ActionController::TestCase | @@ -453,10 +453,10 @@ class SearchControllerTest < ActionController::TestCase | ||
| 453 | 453 | ||
| 454 | should 'list recent articles in the category' do | 454 | should 'list recent articles in the category' do |
| 455 | recent = [] | 455 | recent = [] |
| 456 | - finger = CategoryFinder.new(@category) | ||
| 457 | - finger.expects(:recent).with(any_parameters).at_least_once | ||
| 458 | - finger.expects(:recent).with('text_articles', anything).returns(recent) | ||
| 459 | - CategoryFinder.expects(:new).with(@category).returns(finger) | 456 | + finder = CategoryFinder.new(@category) |
| 457 | + finder.expects(:recent).with(any_parameters).at_least_once | ||
| 458 | + finder.expects(:recent).with('text_articles', anything).returns(recent) | ||
| 459 | + CategoryFinder.expects(:new).with(@category).returns(finder) | ||
| 460 | 460 | ||
| 461 | get :category_index, :category_path => [ 'my-category' ] | 461 | get :category_index, :category_path => [ 'my-category' ] |
| 462 | assert_same recent, assigns(:results)[:articles] | 462 | assert_same recent, assigns(:results)[:articles] |
| @@ -464,9 +464,9 @@ class SearchControllerTest < ActionController::TestCase | @@ -464,9 +464,9 @@ class SearchControllerTest < ActionController::TestCase | ||
| 464 | 464 | ||
| 465 | should 'list most commented articles in the category' do | 465 | should 'list most commented articles in the category' do |
| 466 | most_commented = [] | 466 | most_commented = [] |
| 467 | - finger = CategoryFinder.new(@category) | ||
| 468 | - finger.expects(:most_commented_articles).returns(most_commented) | ||
| 469 | - CategoryFinder.expects(:new).with(@category).returns(finger) | 467 | + finder = CategoryFinder.new(@category) |
| 468 | + finder.expects(:most_commented_articles).returns(most_commented) | ||
| 469 | + CategoryFinder.expects(:new).with(@category).returns(finder) | ||
| 470 | 470 | ||
| 471 | get :category_index, :category_path => [ 'my-category' ] | 471 | get :category_index, :category_path => [ 'my-category' ] |
| 472 | assert_same most_commented, assigns(:results)[:most_commented_articles] | 472 | assert_same most_commented, assigns(:results)[:most_commented_articles] |
| @@ -474,10 +474,10 @@ class SearchControllerTest < ActionController::TestCase | @@ -474,10 +474,10 @@ class SearchControllerTest < ActionController::TestCase | ||
| 474 | 474 | ||
| 475 | should 'list recently registered people in the category' do | 475 | should 'list recently registered people in the category' do |
| 476 | recent_people = [] | 476 | recent_people = [] |
| 477 | - finger = CategoryFinder.new(@category) | ||
| 478 | - finger.expects(:recent).with(any_parameters).at_least_once | ||
| 479 | - finger.expects(:recent).with('people', kind_of(Integer)).returns(recent_people) | ||
| 480 | - CategoryFinder.expects(:new).with(@category).returns(finger) | 477 | + finder = CategoryFinder.new(@category) |
| 478 | + finder.expects(:recent).with(any_parameters).at_least_once | ||
| 479 | + finder.expects(:recent).with('people', kind_of(Integer)).returns(recent_people) | ||
| 480 | + CategoryFinder.expects(:new).with(@category).returns(finder) | ||
| 481 | 481 | ||
| 482 | get :category_index, :category_path => [ 'my-category' ] | 482 | get :category_index, :category_path => [ 'my-category' ] |
| 483 | assert_same recent_people, assigns(:results)[:people] | 483 | assert_same recent_people, assigns(:results)[:people] |
| @@ -485,10 +485,10 @@ class SearchControllerTest < ActionController::TestCase | @@ -485,10 +485,10 @@ class SearchControllerTest < ActionController::TestCase | ||
| 485 | 485 | ||
| 486 | should 'list recently registered communities in the category' do | 486 | should 'list recently registered communities in the category' do |
| 487 | recent_communities = [] | 487 | recent_communities = [] |
| 488 | - finger = CategoryFinder.new(@category) | ||
| 489 | - finger.expects(:recent).with(any_parameters).at_least_once | ||
| 490 | - finger.expects(:recent).with('communities', anything).returns(recent_communities) | ||
| 491 | - CategoryFinder.expects(:new).with(@category).returns(finger) | 488 | + finder = CategoryFinder.new(@category) |
| 489 | + finder.expects(:recent).with(any_parameters).at_least_once | ||
| 490 | + finder.expects(:recent).with('communities', anything).returns(recent_communities) | ||
| 491 | + CategoryFinder.expects(:new).with(@category).returns(finder) | ||
| 492 | 492 | ||
| 493 | get :category_index, :category_path => [ 'my-category' ] | 493 | get :category_index, :category_path => [ 'my-category' ] |
| 494 | assert_same recent_communities, assigns(:results)[:communities] | 494 | assert_same recent_communities, assigns(:results)[:communities] |
| @@ -496,10 +496,10 @@ class SearchControllerTest < ActionController::TestCase | @@ -496,10 +496,10 @@ class SearchControllerTest < ActionController::TestCase | ||
| 496 | 496 | ||
| 497 | should 'list recently registered enterprises in the category' do | 497 | should 'list recently registered enterprises in the category' do |
| 498 | recent_enterptises = [] | 498 | recent_enterptises = [] |
| 499 | - finger = CategoryFinder.new(@category) | ||
| 500 | - finger.expects(:recent).with(any_parameters).at_least_once | ||
| 501 | - finger.expects(:recent).with('enterprises', anything).returns(recent_enterptises) | ||
| 502 | - CategoryFinder.expects(:new).with(@category).returns(finger) | 499 | + finder = CategoryFinder.new(@category) |
| 500 | + finder.expects(:recent).with(any_parameters).at_least_once | ||
| 501 | + finder.expects(:recent).with('enterprises', anything).returns(recent_enterptises) | ||
| 502 | + CategoryFinder.expects(:new).with(@category).returns(finder) | ||
| 503 | 503 | ||
| 504 | get :category_index, :category_path => [ 'my-category' ] | 504 | get :category_index, :category_path => [ 'my-category' ] |
| 505 | assert_same recent_enterptises, assigns(:results)[:enterprises] | 505 | assert_same recent_enterptises, assigns(:results)[:enterprises] |