test/results_test.rb in inquisitio-1.2.1 vs test/results_test.rb in inquisitio-1.2.2

- old
+ new

@@ -30,10 +30,16 @@ searcher = Searcher.where("star_wars") searcher.search assert_equal @found, searcher.total_entries end + def test_should_return_time_taken + searcher = Searcher.where("star_wars") + searcher.search + assert_equal 3, searcher.time_ms + end + def test_total_entries_should_proxy searcher = Searcher.where("star_wars") searcher.search assert_equal @found, searcher.total_count end @@ -86,16 +92,16 @@ searcher.search assert_equal 3, searcher.num_pages end def test_last_page_before - results = Inquisitio::Results.new([], 1, nil, nil) + results = Inquisitio::Results.new([], 1, nil, nil, 7) results.expects(total_pages: 2) refute results.last_page? end def test_last_page_equal - results = Inquisitio::Results.new([], 2, nil, nil) + results = Inquisitio::Results.new([], 2, nil, nil, 7) results.expects(total_pages: 2) assert results.last_page? end end end