2026-02-11 16:48:41: merge [main:c304645d60621efc82700d4c7e501c49a2b2935b];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
This commit is contained in:
1 parent
1651a1fc3c
commit
e4445eca46
24 files changed
+2709
-1608
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package tests_test
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -196,3 +197,26 @@ func (s *SecureSuite) TestAuthorize_NotFound() {
|
||||
Authorized: false,
|
||||
}, result)
|
||||
}
|
||||
|
||||
func (s *SecureSuite) TestAuthorize_WithHttpMethod_Success_True() {
|
||||
InsertAccessList(s.testDb, entity.AccessList{
|
||||
AppId: 7,
|
||||
HttpMethod: http.MethodGet,
|
||||
Method: "endpoint/available_http",
|
||||
Value: true,
|
||||
})
|
||||
|
||||
result := domain.AuthorizeResponse{}
|
||||
err := s.api.Invoke("system/secure/authorize").
|
||||
JsonRequestBody(domain.AuthorizeRequest{
|
||||
ApplicationId: 7,
|
||||
HttpMethod: http.MethodGet,
|
||||
Endpoint: "endpoint/available_http",
|
||||
}).
|
||||
JsonResponseBody(&result).
|
||||
Do(s.T().Context())
|
||||
s.Require().NoError(err)
|
||||
s.Require().Equal(domain.AuthorizeResponse{
|
||||
Authorized: true,
|
||||
}, result)
|
||||
}
|
||||
Reference in new issue
Block a user