Skip to content

Commit

Permalink
oops, use the correct key when cleaning up the suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rococodogs committed Dec 12, 2019
1 parent 036fd42 commit c58a8c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/authorities/qa/authorities/solr_suggest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def parse_raw_response(raw, query:)
suggestions ||= []

suggestions.map do |res|
{ id: res['payload'], label: res['payload'], value: res['payload'] }
{ id: res['term'], label: res['term'], value: res['term'] }
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/authorities/qa/authorities/solr_suggest_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
let(:expected_results) do
[obj1, obj3]
.map { |t| t[solr_field].first }
.map { |v| { id: v, value: v } }
.map { |v| { id: v, label: v, value: v } }
end

it { is_expected.to eq expected_results }
Expand Down

0 comments on commit c58a8c1

Please sign in to comment.