diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index 18a3f0cef..56d7bf455 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -135,6 +135,15 @@ func TestSSHKeys(t *testing.T) { testscript.Run(t, testScriptParamsFor(tsEnv, "ssh-key")) } +func TestOrg(t *testing.T) { + var tsEnv testScriptEnv + if err := tsEnv.fromEnv(); err != nil { + t.Fatal(err) + } + + testscript.Run(t, testScriptParamsFor(tsEnv, "org")) +} + func testScriptParamsFor(tsEnv testScriptEnv, command string) testscript.Params { var files []string if tsEnv.script != "" { diff --git a/acceptance/testdata/org/org-list.txtar b/acceptance/testdata/org/org-list.txtar new file mode 100644 index 000000000..ca114babe --- /dev/null +++ b/acceptance/testdata/org/org-list.txtar @@ -0,0 +1,6 @@ +# This test could fail if the user is a member of more than 30 organizations because +# the `gh org list` command only returns the first 30 organizations the user is a member of + +# List organizations the user is a member of +exec gh org list +stdout ${GH_ACCEPTANCE_ORG} \ No newline at end of file