MCPcopy Index your code
hub / github.com/SpecterOps/BloodHound / TestGetSkipParamForGraphQuery

Function TestGetSkipParamForGraphQuery

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

Source from the content-addressed store, hash-verified

385}
386
387func TestGetSkipParamForGraphQuery(t *testing.T) {
388 params := url.Values{}
389 params.Add("skip", "foo")
390
391 _, err := utils.GetSkipParamForGraphQuery(params)
392 require.Error(t, err)
393
394 expectedSkip := "10"
395 expectedSkipInt := 10
396
397 params = url.Values{}
398 params.Add("skip", expectedSkip)
399
400 actualSkip, err := utils.GetSkipParamForGraphQuery(params)
401 require.Nil(t, err)
402 require.Equal(t, expectedSkipInt, actualSkip)
403}
404
405func TestGetLimitParamForGraphQuery(t *testing.T) {
406 params := url.Values{}

Callers

nothing calls this directly

Calls 4

AddMethod · 0.45
ErrorMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected