test/results_test.rb in inquisitio-2.0.0 vs test/results_test.rb in inquisitio-2.1.0
- old
+ new
@@ -39,10 +39,13 @@
searcher.search
assert_equal @found, searcher.total_entries
end
def test_should_return_time_taken
- body = "{\"status\": {\"rid\" : \"u9aP4eYo8gIK0csK\", \"time-ms\": 4}, \"hits\" : {\"#{@found}\": 33, \"#{@start}\": 0, \"hit\":#{@expected_results.to_json} }}"
+ body = {
+ 'status' => {'rid' => 'u9aP4eYo8gIK0csK', 'time-ms' => 4},
+ 'hits' => {'found' => 33, 'start' => 0, 'hit' => @expected_results}
+ }.to_json
Excon.stubs.clear
Excon.stub({}, {body: body, status: 200})
searcher = Searcher.where('star_wars')
searcher.search