mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user