Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

search_controller_test results test for >=1, to work wtih both mock a…

…nd real data
  • Loading branch information...
commit 2a063b398d6336bf225c4fedc2faf3ad243b7249 1 parent d6999de
@jrochkind jrochkind authored
Showing with 3 additions and 7 deletions.
  1. +3 −7 test/functional/search_controller_test.rb
View
10 test/functional/search_controller_test.rb
@@ -2,10 +2,6 @@
class SearchControllerTest < ActionController::TestCase
setup do
@controller = SearchController.new
-
- # Weird, sorry internal implementation isn't great for testabiltiy
- @search_page_size = @controller.class.class_variable_get("@@search_batch_size")
- @az_page_size = @controller.class.class_variable_get("@@az_batch_size")
end
test "index" do
@@ -25,7 +21,7 @@ class SearchControllerTest < ActionController::TestCase
assert_select "title", "Find It | Journal titles that begin with &#x27;Account&#x27;"
assert_select ".citationLinker", 1
assert_select ".list", 1
- assert_select ".list .citation", @search_page_size
+ assert_select ".list .citation", :minimum => 1
assert_select ".pagination", 2
assert_select ".azNav", 0
end
@@ -37,8 +33,8 @@ class SearchControllerTest < ActionController::TestCase
assert_select "title", "Find It | Browse by Journal Title: A"
assert_select ".citationLinker", 1
assert_select ".list", 1
- assert_select ".list .citation", @az_page_size
+ assert_select ".list .citation", :minimum => 1
assert_select ".pagination", 2
assert_select ".azNav", 2
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.