Skip to content

Commit 6c3d93f

Browse files
author
Alice Bartlett
committed
count should be a string / trailing comma
`count` should be a string not an integer, though there should only ever be 1 result when searching by link anyway. Add a trailing comma for cleaner diffs(tm).
1 parent 40b266d commit 6c3d93f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎lib/search_api.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def scope_info
3333
{
3434
scope: {
3535
title: scope_object.title,
36-
}
36+
},
3737
}
3838
else
3939
{}
@@ -45,7 +45,7 @@ def rummager_params
4545
end
4646

4747
defscope_object
48-
@scope_object ||= api.unified_search(filter_link: scope_object_link,count: 1,fields: %w{title}).results.first
48+
@scope_object ||= api.unified_search(filter_link: scope_object_link,count: "1",fields: %w{title}).results.first
4949
end
5050

5151
defis_scoped?

‎test/unit/search_api_test.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SearchAPITest < ActiveSupport::TestCase
3333
@search_params.expects(:filter).with('manual').returns([@manual_link])
3434
@manual_search_response=stub(results: [stub(title: @manual_title)])
3535

36-
@rummager_api.expects(:unified_search).with(filter_link: @manual_link,count: 1,fields: %w{title}).returns(@manual_search_response)
36+
@rummager_api.expects(:unified_search).with(filter_link: @manual_link,count: "1",fields: %w{title}).returns(@manual_search_response)
3737
end
3838

3939
should"returns search results from rummager"do

0 commit comments

Comments
(0)