fix: restore displaced TODO comment, add GHES edit relationship test
- Restore // TODO projectsV1Deprecation comment above TestProjectsV1Deprecation (was displaced when new tests were inserted at that location) - Add 'relationships unsupported on GHES' test case to edit command using DisabledDetectorMock (parity with create's GHES tests) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
4a196ddf1d
commit
e3b0d9dec3
2 changed files with 18 additions and 2 deletions
|
|
@ -1260,8 +1260,6 @@ func TestIssueCreate_projectsV2(t *testing.T) {
|
|||
assert.Equal(t, "https://github.com/OWNER/REPO/issues/12\n", output.String())
|
||||
}
|
||||
|
||||
// TODO projectsV1Deprecation
|
||||
// Remove this test.
|
||||
func TestNewCmdCreate_issuesV2Flags(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
|
@ -1604,6 +1602,8 @@ func Test_createRun_issuesV2(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO projectsV1Deprecation
|
||||
// Remove this test.
|
||||
func TestProjectsV1Deprecation(t *testing.T) {
|
||||
|
||||
t.Run("non-interactive submission", func(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -1136,6 +1136,22 @@ func Test_editRun(t *testing.T) {
|
|||
},
|
||||
stdout: "https://github.com/OWNER/REPO/issue/123\n",
|
||||
},
|
||||
{
|
||||
name: "relationships unsupported on GHES",
|
||||
input: &EditOptions{
|
||||
Detector: &fd.DisabledDetectorMock{},
|
||||
IssueNumbers: []int{123},
|
||||
Interactive: false,
|
||||
AddBlockedBy: []string{"200"},
|
||||
FetchOptions: func(_ *api.Client, _ ghrepo.Interface, _ *prShared.Editable, _ gh.ProjectsV1Support) error {
|
||||
return nil
|
||||
},
|
||||
},
|
||||
httpStubs: func(t *testing.T, reg *httpmock.Registry) {
|
||||
mockIssueGet(t, reg)
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "batch edit type",
|
||||
input: &EditOptions{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue