Skip to content

Commit

Permalink
Test for #484
Browse files Browse the repository at this point in the history
  • Loading branch information
vektah committed Feb 7, 2019
1 parent 9a48a00 commit de148d1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions codegen/testserver/interfaces_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package testserver

import (
"reflect"
"testing"

"github.com/stretchr/testify/require"
)

func TestInterfaces(t *testing.T) {
t.Run("slices of interfaces are not pointers", func(t *testing.T) {
field, ok := reflect.TypeOf((*QueryResolver)(nil)).Elem().MethodByName("Shapes")
require.True(t, ok)
require.Equal(t, "[]testserver.Shape", field.Type.Out(0).String())
})
}

0 comments on commit de148d1

Please sign in to comment.