We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbba2b0 commit 794a6c9Copy full SHA for 794a6c9
github/search_test.go
@@ -665,3 +665,26 @@ func TestLabelResult_Marshal(t *testing.T) {
665
666
testJSONMarshal(t, u, want)
667
}
668
+
669
+func TestSearchOptions_Marshal(t *testing.T) {
670
+ testJSONMarshal(t, &SearchOptions{}, "{}")
671
672
+ u := &SearchOptions{
673
+ Sort: "author-date",
674
+ Order: "asc",
675
+ TextMatch: false,
676
+ ListOptions: ListOptions{
677
+ Page: int(1),
678
+ PerPage: int(10),
679
+ },
680
+ }
681
682
+ want := `{
683
+ "sort": "author-date",
684
+ "order": "asc",
685
+ "page": 1,
686
+ "perPage": 10
687
+ }`
688
689
+ testJSONMarshal(t, u, want)
690
+}
0 commit comments