(t *testing.T)
| 778 | } |
| 779 | |
| 780 | func TestAPI_EditCodespacePendingOperation(t *testing.T) { |
| 781 | svr := createFakeEditPendingOpServer() |
| 782 | defer svr.Close() |
| 783 | |
| 784 | a := &API{ |
| 785 | client: createHttpClient, |
| 786 | githubAPI: svr.URL, |
| 787 | } |
| 788 | |
| 789 | _, err := a.EditCodespace(context.Background(), "disabledCodespace", &EditCodespaceParams{DisplayName: "some silly name"}) |
| 790 | if err == nil { |
| 791 | t.Error("Expected pending operation error, but got nothing") |
| 792 | } |
| 793 | if err.Error() != "codespace is disabled while it has a pending operation: Some pending operation" { |
| 794 | t.Errorf("Expected pending operation error, but got %v", err) |
| 795 | } |
| 796 | } |
nothing calls this directly
no test coverage detected