(t *testing.T)
| 403 | } |
| 404 | |
| 405 | func 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 | |
| 423 | func TestGetOrderForNeo4jQuery(t *testing.T) { |
| 424 | expectedResult := "n.someColumn, n.anotherColumn DESC" |
nothing calls this directly
no test coverage detected