forked from baron/baron-sso
test(backend): add unit tests for user group management and fix interface inconsistencies
This commit is contained in:
@@ -57,9 +57,12 @@ func TestKetoService_CreateRelation(t *testing.T) {
|
||||
|
||||
func TestKetoService_DeleteRelation(t *testing.T) {
|
||||
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
assert.Equal(t, "/relation-tuples", r.URL.Path)
|
||||
assert.Equal(t, "/admin/relation-tuples", r.URL.Path)
|
||||
assert.Equal(t, "DELETE", r.Method)
|
||||
assert.Equal(t, "user1", r.URL.Query().Get("subject_id"))
|
||||
assert.Equal(t, "tenants", r.URL.Query().Get("namespace"))
|
||||
assert.Equal(t, "tenant1", r.URL.Query().Get("object"))
|
||||
assert.Equal(t, "admin", r.URL.Query().Get("relation"))
|
||||
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user