From c572edbfd797780426def51559b3e0fece1ff59e Mon Sep 17 00:00:00 2001 From: Tyler McGoffin Date: Thu, 17 Oct 2024 10:08:14 -0700 Subject: [PATCH] Add acceptance test for repo-edit --- acceptance/testdata/repos/repo-edit.txtar | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 acceptance/testdata/repos/repo-edit.txtar diff --git a/acceptance/testdata/repos/repo-edit.txtar b/acceptance/testdata/repos/repo-edit.txtar new file mode 100644 index 000000000..c8e293cc0 --- /dev/null +++ b/acceptance/testdata/repos/repo-edit.txtar @@ -0,0 +1,19 @@ +# Use gh as a credential helper +exec gh auth setup-git + +# Create a repository with a file so it has a default branch +exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --add-readme --private + +# Defer repo cleanup +defer gh repo delete --yes $ORG/$SCRIPT_NAME-$RANDOM_STRING + +# Check that the repo description is empty +exec gh repo view $ORG/$SCRIPT_NAME-$RANDOM_STRING --json description --jq '.description' +stdout '' + +# Edit the repo description +exec gh repo edit $ORG/$SCRIPT_NAME-$RANDOM_STRING --description 'newDescription' + +# Check that the repo description is updated +exec gh repo view $ORG/$SCRIPT_NAME-$RANDOM_STRING --json description --jq '.description' +stdout 'newDescription' \ No newline at end of file