@@ -49,6 +49,9 @@ func TestSearch(t *testing.T) {
4949 err := searchCmd .RunE (searchCmd , []string {"login" , "error" })
5050 assertExitCode (t , err , 0 )
5151
52+ if len (mock .GetWithPaginationCalls ) != 1 {
53+ t .Fatalf ("expected 1 GET call, got %d" , len (mock .GetWithPaginationCalls ))
54+ }
5255 if got := mock .GetWithPaginationCalls [0 ].Path ; got != "/search.json?q=login+error" {
5356 t .Errorf ("expected '/search.json?q=login+error', got '%s'" , got )
5457 }
@@ -68,6 +71,9 @@ func TestSearch(t *testing.T) {
6871 err := searchCmd .RunE (searchCmd , []string {"foo&bar=baz" })
6972 assertExitCode (t , err , 0 )
7073
74+ if len (mock .GetWithPaginationCalls ) != 1 {
75+ t .Fatalf ("expected 1 GET call, got %d" , len (mock .GetWithPaginationCalls ))
76+ }
7177 if got := mock .GetWithPaginationCalls [0 ].Path ; got != "/search.json?q=foo%26bar%3Dbaz" {
7278 t .Errorf ("expected URL-encoded q, got '%s'" , got )
7379 }
@@ -88,6 +94,9 @@ func TestSearch(t *testing.T) {
8894 err := searchCmd .RunE (searchCmd , []string {"bug" })
8995 assertExitCode (t , err , 0 )
9096
97+ if len (mock .GetWithPaginationCalls ) != 1 {
98+ t .Fatalf ("expected 1 GET call, got %d" , len (mock .GetWithPaginationCalls ))
99+ }
91100 if got := mock .GetWithPaginationCalls [0 ].Path ; got != "/search.json?q=bug" {
92101 t .Errorf ("expected no board params in path, got '%s'" , got )
93102 }
0 commit comments