From 455cef23c4a7b347e6f478f6e568ac7ecf94e7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raphael=20Z=C3=B6llner?= Date: Tue, 23 Feb 2021 16:15:20 +0100 Subject: [PATCH] Update playground tests with playground configuration Format tests with gofmt (cherry picked from commit 3afa9bf2245d34fe0b817a2c0f24796d26a87fa3) --- graphcoolPlayground_test.go | 8 +++++--- handler_test.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/graphcoolPlayground_test.go b/graphcoolPlayground_test.go index 8d42fc4..0f87a75 100644 --- a/graphcoolPlayground_test.go +++ b/graphcoolPlayground_test.go @@ -62,9 +62,11 @@ func TestRenderPlayground(t *testing.T) { req.Header.Set("Accept", tc.accept) h := handler.New(&handler.Config{ - Schema: &testutil.StarWarsSchema, - GraphiQL: false, - Playground: tc.playgroundEnabled, + Schema: &testutil.StarWarsSchema, + GraphiQL: false, + Playground: &handler.PlaygroundConfig{ + Enabled: tc.playgroundEnabled, + }, }) rr := httptest.NewRecorder() diff --git a/handler_test.go b/handler_test.go index 4154b1a..92db1a5 100644 --- a/handler_test.go +++ b/handler_test.go @@ -245,7 +245,7 @@ func TestHandler_BasicQuery_WithFormatErrorFn(t *testing.T) { customFormattedError := gqlerrors.FormattedError{ Message: resolverError.Error(), Locations: []location.SourceLocation{ - location.SourceLocation{ + { Line: 1, Column: 2, },