MCPcopy
hub / github.com/SpecterOps/BloodHound / TestGetLimitParamForGraphQuery

Function TestGetLimitParamForGraphQuery

cmd/api/src/utils/util_test.go:405–421  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

403}
404
405func TestGetLimitParamForGraphQuery(t *testing.T) {
406 params := url.Values{}
407 params.Add("limit", "foo")
408
409 _, err := utils.GetLimitParamForGraphQuery(params)
410 require.Error(t, err)
411
412 expectedLimit := "10"
413 expectedLimitInt := 10
414
415 params = url.Values{}
416 params.Add("skip", expectedLimit)
417
418 actualSkip, err := utils.GetSkipParamForGraphQuery(params)
419 require.Nil(t, err)
420 require.Equal(t, expectedLimitInt, actualSkip)
421}
422
423func TestGetOrderForNeo4jQuery(t *testing.T) {
424 expectedResult := "n.someColumn, n.anotherColumn DESC"

Callers

nothing calls this directly

Calls 5

AddMethod · 0.45
ErrorMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected