(t *testing.T)
| 143 | } |
| 144 | |
| 145 | func TestActivityService_IsStarred_hasStar(t *testing.T) { |
| 146 | t.Parallel() |
| 147 | client, mux, _ := setup(t) |
| 148 | |
| 149 | mux.HandleFunc("/user/starred/o/r", func(w http.ResponseWriter, r *http.Request) { |
| 150 | testMethod(t, r, "GET") |
| 151 | w.WriteHeader(http.StatusNoContent) |
| 152 | }) |
| 153 | |
| 154 | ctx := t.Context() |
| 155 | star, _, err := client.Activity.IsStarred(ctx, "o", "r") |
| 156 | if err != nil { |
| 157 | t.Errorf("Activity.IsStarred returned error: %v", err) |
| 158 | } |
| 159 | if want := true; star != want { |
| 160 | t.Errorf("Activity.IsStarred returned %+v, want %+v", star, want) |
| 161 | } |
| 162 | |
| 163 | const methodName = "IsStarred" |
| 164 | testBadOptions(t, methodName, func() (err error) { |
| 165 | _, _, err = client.Activity.IsStarred(ctx, "\n", "\n") |
| 166 | return err |
| 167 | }) |
| 168 | |
| 169 | testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { |
| 170 | got, resp, err := client.Activity.IsStarred(ctx, "o", "r") |
| 171 | if got { |
| 172 | t.Errorf("testNewRequestAndDoFailure %v = %#v, want false", methodName, got) |
| 173 | } |
| 174 | return resp, err |
| 175 | }) |
| 176 | } |
| 177 | |
| 178 | func TestActivityService_IsStarred_noStar(t *testing.T) { |
| 179 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…