|
|
|
@ -515,9 +515,7 @@ var cases = []*testIndexerCase{ |
|
|
|
|
{ |
|
|
|
|
Name: "SortByCreatedDesc", |
|
|
|
|
SearchOptions: &internal.SearchOptions{ |
|
|
|
|
Paginator: &db.ListOptions{ |
|
|
|
|
ListAll: true, |
|
|
|
|
}, |
|
|
|
|
Paginator: &db.ListOptionsAll, |
|
|
|
|
SortBy: internal.SortByCreatedDesc, |
|
|
|
|
}, |
|
|
|
|
Expected: func(t *testing.T, data map[int64]*internal.IndexerData, result *internal.SearchResult) { |
|
|
|
@ -533,9 +531,7 @@ var cases = []*testIndexerCase{ |
|
|
|
|
{ |
|
|
|
|
Name: "SortByUpdatedDesc", |
|
|
|
|
SearchOptions: &internal.SearchOptions{ |
|
|
|
|
Paginator: &db.ListOptions{ |
|
|
|
|
ListAll: true, |
|
|
|
|
}, |
|
|
|
|
Paginator: &db.ListOptionsAll, |
|
|
|
|
SortBy: internal.SortByUpdatedDesc, |
|
|
|
|
}, |
|
|
|
|
Expected: func(t *testing.T, data map[int64]*internal.IndexerData, result *internal.SearchResult) { |
|
|
|
@ -551,9 +547,7 @@ var cases = []*testIndexerCase{ |
|
|
|
|
{ |
|
|
|
|
Name: "SortByCommentsDesc", |
|
|
|
|
SearchOptions: &internal.SearchOptions{ |
|
|
|
|
Paginator: &db.ListOptions{ |
|
|
|
|
ListAll: true, |
|
|
|
|
}, |
|
|
|
|
Paginator: &db.ListOptionsAll, |
|
|
|
|
SortBy: internal.SortByCommentsDesc, |
|
|
|
|
}, |
|
|
|
|
Expected: func(t *testing.T, data map[int64]*internal.IndexerData, result *internal.SearchResult) { |
|
|
|
@ -569,9 +563,7 @@ var cases = []*testIndexerCase{ |
|
|
|
|
{ |
|
|
|
|
Name: "SortByDeadlineDesc", |
|
|
|
|
SearchOptions: &internal.SearchOptions{ |
|
|
|
|
Paginator: &db.ListOptions{ |
|
|
|
|
ListAll: true, |
|
|
|
|
}, |
|
|
|
|
Paginator: &db.ListOptionsAll, |
|
|
|
|
SortBy: internal.SortByDeadlineDesc, |
|
|
|
|
}, |
|
|
|
|
Expected: func(t *testing.T, data map[int64]*internal.IndexerData, result *internal.SearchResult) { |
|
|
|
@ -587,9 +579,7 @@ var cases = []*testIndexerCase{ |
|
|
|
|
{ |
|
|
|
|
Name: "SortByCreatedAsc", |
|
|
|
|
SearchOptions: &internal.SearchOptions{ |
|
|
|
|
Paginator: &db.ListOptions{ |
|
|
|
|
ListAll: true, |
|
|
|
|
}, |
|
|
|
|
Paginator: &db.ListOptionsAll, |
|
|
|
|
SortBy: internal.SortByCreatedAsc, |
|
|
|
|
}, |
|
|
|
|
Expected: func(t *testing.T, data map[int64]*internal.IndexerData, result *internal.SearchResult) { |
|
|
|
@ -605,9 +595,7 @@ var cases = []*testIndexerCase{ |
|
|
|
|
{ |
|
|
|
|
Name: "SortByUpdatedAsc", |
|
|
|
|
SearchOptions: &internal.SearchOptions{ |
|
|
|
|
Paginator: &db.ListOptions{ |
|
|
|
|
ListAll: true, |
|
|
|
|
}, |
|
|
|
|
Paginator: &db.ListOptionsAll, |
|
|
|
|
SortBy: internal.SortByUpdatedAsc, |
|
|
|
|
}, |
|
|
|
|
Expected: func(t *testing.T, data map[int64]*internal.IndexerData, result *internal.SearchResult) { |
|
|
|
@ -623,9 +611,7 @@ var cases = []*testIndexerCase{ |
|
|
|
|
{ |
|
|
|
|
Name: "SortByCommentsAsc", |
|
|
|
|
SearchOptions: &internal.SearchOptions{ |
|
|
|
|
Paginator: &db.ListOptions{ |
|
|
|
|
ListAll: true, |
|
|
|
|
}, |
|
|
|
|
Paginator: &db.ListOptionsAll, |
|
|
|
|
SortBy: internal.SortByCommentsAsc, |
|
|
|
|
}, |
|
|
|
|
Expected: func(t *testing.T, data map[int64]*internal.IndexerData, result *internal.SearchResult) { |
|
|
|
@ -641,9 +627,7 @@ var cases = []*testIndexerCase{ |
|
|
|
|
{ |
|
|
|
|
Name: "SortByDeadlineAsc", |
|
|
|
|
SearchOptions: &internal.SearchOptions{ |
|
|
|
|
Paginator: &db.ListOptions{ |
|
|
|
|
ListAll: true, |
|
|
|
|
}, |
|
|
|
|
Paginator: &db.ListOptionsAll, |
|
|
|
|
SortBy: internal.SortByDeadlineAsc, |
|
|
|
|
}, |
|
|
|
|
Expected: func(t *testing.T, data map[int64]*internal.IndexerData, result *internal.SearchResult) { |
|
|
|
|