more API endpoints checks multicompany auth with the same error message (#36409)

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
This commit is contained in:
Jon Bendtsen
2025-11-25 14:32:28 +01:00
committed by GitHub
parent 712da5b172
commit 280ca20600
3 changed files with 19 additions and 6 deletions

View File

@@ -84,8 +84,12 @@ HTTP 200
# GET proposals DOLAPIENTITY: 2
GET http://{{hostnport}}/api/index.php/proposals
DOLAPIENTITY: 2
HTTP 403
{"error":{"code":403,"message":"Forbidden"}}
HTTP 401
[Asserts]
jsonpath "$.error" exists
jsonpath "$.error.code" == 401
jsonpath "$.error.message" contains "Unauthorized"
jsonpath "$.error.message" contains "Token not valid (may be a typo or a wrong entity)"
# Capture a proposal ID number
GET http://{{hostnport}}/api/index.php/proposals?limit=1

View File

@@ -84,8 +84,13 @@ HTTP 200
# GET orders DOLAPIENTITY: 2
GET http://{{hostnport}}/api/index.php/orders
DOLAPIENTITY: 2
HTTP 403
{"error":{"code":403,"message":"Forbidden"}}
HTTP 401
[Asserts]
jsonpath "$.error" exists
jsonpath "$.error.code" == 401
jsonpath "$.error.message" contains "Unauthorized"
jsonpath "$.error.message" contains "Token not valid (may be a typo or a wrong entity)"
# Capture a order ID number
GET http://{{hostnport}}/api/index.php/orders?limit=1

View File

@@ -77,8 +77,12 @@ HTTP 200
# GET invoices DOLAPIENTITY: 2
GET http://{{hostnport}}/api/index.php/invoices
DOLAPIENTITY: 2
HTTP 403
{"error":{"code":403,"message":"Forbidden"}}
HTTP 401
[Asserts]
jsonpath "$.error" exists
jsonpath "$.error.code" == 401
jsonpath "$.error.message" contains "Unauthorized"
jsonpath "$.error.message" contains "Token not valid (may be a typo or a wrong entity)"
# Capture a invoice ID number
GET http://{{hostnport}}/api/index.php/invoices?limit=1