forked from sr2/cloud-api
feat: group name unique per org
Instead of group names being wholly unique (enforced by the db), group names are unique within the org (enforced by endpoint logic).
This commit is contained in:
parent
3f7abc5986
commit
dad23733e8
3 changed files with 52 additions and 1 deletions
|
|
@ -283,6 +283,15 @@ async def test_post_group_conflict(default_client: AsyncClient):
|
|||
assert resp.status_code == 409
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_post_group_non_conflict(default_client: AsyncClient):
|
||||
resp = await default_client.post(
|
||||
"/iam/group", json={"organisation_id": 2, "name": "Org One Group"}
|
||||
)
|
||||
|
||||
assert resp.status_code == 201
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_put_group_perm_success(default_client: AsyncClient):
|
||||
resp = await default_client.put(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue