Skip to content

Commit 03667e6

Browse files
committed
new org transcripts
1 parent 05ac3f1 commit 03667e6

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"body": {
3+
"isCommercial": false,
4+
"orgId": "ORG-<UUID>",
5+
"user": {
6+
"avatarUrl": "https://example.com/staples.png",
7+
"handle": "orgco",
8+
"name": "OrgCo",
9+
"userId": "U-<UUID>"
10+
}
11+
},
12+
"status": [
13+
{
14+
"status_code": 200
15+
}
16+
]
17+
}

transcripts/share-apis/orgs/run.zsh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ new_member="$(create_user newuser)"
1010
# Org creation workflow
1111

1212
# Should fail
13-
fetch "$unauthorized_user" POST org-create-unauthorized '/orgs' '{
13+
fetch "$unauthorized_user" POST org-create-unauthorized-commercial '/orgs' '{
1414
"name": "ACME",
1515
"handle": "acme",
1616
"avatarUrl": "https://example.com/anvil.png",
@@ -19,6 +19,16 @@ fetch "$unauthorized_user" POST org-create-unauthorized '/orgs' '{
1919
"isCommercial": true
2020
}'
2121

22+
# Should succeed, regular users can create non-commercial orgs
23+
fetch "$unauthorized_user" POST org-create-non-commercial-non-admin '/orgs' '{
24+
"name": "OrgCo",
25+
"handle": "orgco",
26+
"avatarUrl": "https://example.com/staples.png",
27+
"owner": "unauthorized",
28+
"email": "[email protected]",
29+
"isCommercial": false
30+
}'
31+
2232
# Admin can create an org and assign any owner.
2333
fetch "$admin_user" POST org-create-by-admin-non-commercial '/orgs' '{
2434
"name": "Noncom",

0 commit comments

Comments
 (0)