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 434b1d8 commit 377f63fCopy full SHA for 377f63f
github/search_test.go
@@ -989,3 +989,21 @@ func TestUsersSearchResult_Marshal(t *testing.T) {
989
990
testJSONMarshal(t, u, want)
991
}
992
+
993
+func TestCodeSearchResult_Marshal(t *testing.T) {
994
+ testJSONMarshal(t, &CodeSearchResult{}, "{}")
995
996
+ u := &CodeSearchResult{
997
+ Total: Int(4),
998
+ IncompleteResults: Bool(false),
999
+ CodeResults: []*CodeResult{{Name: String("n")}},
1000
+ }
1001
1002
+ want := `{
1003
+ "total_count" : 4,
1004
+ "incomplete_results" : false,
1005
+ "items" : [{"name": "n"}]
1006
+ }`
1007
1008
+ testJSONMarshal(t, u, want)
1009
+}
0 commit comments