(t *testing.T)
| 439 | } |
| 440 | |
| 441 | func TestGetUIDInDebugMode(t *testing.T) { |
| 442 | query := ` |
| 443 | { |
| 444 | me(func: uid(0x01)) { |
| 445 | name |
| 446 | uid |
| 447 | gender |
| 448 | alive |
| 449 | friend { |
| 450 | uid |
| 451 | name |
| 452 | } |
| 453 | } |
| 454 | } |
| 455 | ` |
| 456 | |
| 457 | ctx := context.Background() |
| 458 | ctx = context.WithValue(ctx, DebugKey, "true") |
| 459 | js, err := processQuery(ctx, t, query) |
| 460 | require.NoError(t, err) |
| 461 | require.JSONEq(t, |
| 462 | `{"data": {"me":[{"uid":"0x1","alive":true,"friend":[{"uid":"0x17","name":"Rick Grimes"},{"uid":"0x18","name":"Glenn Rhee"},{"uid":"0x19","name":"Daryl Dixon"},{"uid":"0x1f","name":"Andrea"},{"uid":"0x65"}],"gender":"female","name":"Michonne"}]}}`, |
| 463 | js) |
| 464 | |
| 465 | } |
| 466 | |
| 467 | func TestReturnUids(t *testing.T) { |
| 468 | query := ` |
nothing calls this directly
no test coverage detected