mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +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 proposals DOLAPIENTITY: 2
|
||||||
GET http://{{hostnport}}/api/index.php/proposals
|
GET http://{{hostnport}}/api/index.php/proposals
|
||||||
DOLAPIENTITY: 2
|
DOLAPIENTITY: 2
|
||||||
HTTP 403
|
HTTP 401
|
||||||
{"error":{"code":403,"message":"Forbidden"}}
|
[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
|
# Capture a proposal ID number
|
||||||
GET http://{{hostnport}}/api/index.php/proposals?limit=1
|
GET http://{{hostnport}}/api/index.php/proposals?limit=1
|
||||||
|
|||||||
@@ -84,8 +84,13 @@ HTTP 200
|
|||||||
# GET orders DOLAPIENTITY: 2
|
# GET orders DOLAPIENTITY: 2
|
||||||
GET http://{{hostnport}}/api/index.php/orders
|
GET http://{{hostnport}}/api/index.php/orders
|
||||||
DOLAPIENTITY: 2
|
DOLAPIENTITY: 2
|
||||||
HTTP 403
|
HTTP 401
|
||||||
{"error":{"code":403,"message":"Forbidden"}}
|
[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
|
# Capture a order ID number
|
||||||
GET http://{{hostnport}}/api/index.php/orders?limit=1
|
GET http://{{hostnport}}/api/index.php/orders?limit=1
|
||||||
|
|||||||
@@ -77,8 +77,12 @@ HTTP 200
|
|||||||
# GET invoices DOLAPIENTITY: 2
|
# GET invoices DOLAPIENTITY: 2
|
||||||
GET http://{{hostnport}}/api/index.php/invoices
|
GET http://{{hostnport}}/api/index.php/invoices
|
||||||
DOLAPIENTITY: 2
|
DOLAPIENTITY: 2
|
||||||
HTTP 403
|
HTTP 401
|
||||||
{"error":{"code":403,"message":"Forbidden"}}
|
[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
|
# Capture a invoice ID number
|
||||||
GET http://{{hostnport}}/api/index.php/invoices?limit=1
|
GET http://{{hostnport}}/api/index.php/invoices?limit=1
|
||||||
|
|||||||
Reference in New Issue
Block a user