Skip to content

Commit

Permalink
Merge pull request #289 from meilisearch/patch-test-document-order
Browse files Browse the repository at this point in the history
Fix tests due to changing the way of returning documents
  • Loading branch information
alallema authored Apr 27, 2022
2 parents 4f6cb71 + d3d5cc7 commit 44434c1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions index_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestIndex_Search(t *testing.T) {
want: &SearchResponse{
Hits: []interface{}{
map[string]interface{}{
"book_id": float64(1), "title": "Alice In Wonderland",
"book_id": float64(123), "title": "Pride and Prejudice",
},
},
NbHits: 20,
Expand Down Expand Up @@ -191,15 +191,15 @@ func TestIndex_Search(t *testing.T) {
},
want: &SearchResponse{
Hits: []interface{}{
map[string]interface{}{
"book_id": float64(1032), "title": "Crime and Punishment",
},
map[string]interface{}{
"book_id": float64(123), "title": "Pride and Prejudice",
},
map[string]interface{}{
"book_id": float64(730), "title": "War and Peace",
},
map[string]interface{}{
"book_id": float64(1032), "title": "Crime and Punishment",
},
map[string]interface{}{
"book_id": float64(4), "title": "Harry Potter and the Half-Blood Prince",
},
Expand Down Expand Up @@ -532,13 +532,13 @@ func TestIndex_SearchWithFilters(t *testing.T) {
want: &SearchResponse{
Hits: []interface{}{
map[string]interface{}{
"book_id": float64(17), "title": "In Search of Lost Time",
"book_id": float64(742), "title": "The Great Gatsby",
},
map[string]interface{}{
"book_id": float64(204), "title": "Ulysses",
"book_id": float64(17), "title": "In Search of Lost Time",
},
map[string]interface{}{
"book_id": float64(742), "title": "The Great Gatsby",
"book_id": float64(204), "title": "Ulysses",
},
},
NbHits: 3,
Expand Down Expand Up @@ -590,13 +590,13 @@ func TestIndex_SearchWithFilters(t *testing.T) {
want: &SearchResponse{
Hits: []interface{}{
map[string]interface{}{
"book_id": float64(1), "title": "Alice In Wonderland",
"book_id": float64(456), "title": "Le Petit Prince",
},
map[string]interface{}{
"book_id": float64(4), "title": "Harry Potter and the Half-Blood Prince",
"book_id": float64(1), "title": "Alice In Wonderland",
},
map[string]interface{}{
"book_id": float64(456), "title": "Le Petit Prince",
"book_id": float64(4), "title": "Harry Potter and the Half-Blood Prince",
},
},
NbHits: 3,
Expand Down

0 comments on commit 44434c1

Please sign in to comment.