github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/test/integration/orgs_int_test.go (about) 1 package integration 2 3 import ( 4 "testing" 5 6 "github.com/ActiveState/cli/internal/testhelpers/e2e" 7 "github.com/ActiveState/cli/internal/testhelpers/suite" 8 "github.com/ActiveState/cli/internal/testhelpers/tagsuite" 9 ) 10 11 type OrganizationsIntegrationTestSuite struct { 12 tagsuite.Suite 13 } 14 15 func (suite *OrganizationsIntegrationTestSuite) TestJSON() { 16 suite.OnlyRunForTags(tagsuite.Organizations, tagsuite.JSON) 17 ts := e2e.New(suite.T(), false) 18 defer ts.Close() 19 20 ts.LoginAsPersistentUser() 21 cp := ts.Spawn("organizations", "-o", "json") 22 cp.Expect(`[{"name":`) 23 cp.ExpectExitCode(0) 24 AssertValidJSON(suite.T(), cp) 25 } 26 27 func TestOrganizationsIntegrationTestSuite(t *testing.T) { 28 suite.Run(t, new(OrganizationsIntegrationTestSuite)) 29 }