Skip to content

Commit

Permalink
removes test skip since validator is implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-ramon committed Dec 20, 2015
1 parent e692c16 commit 5f9e0da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
22 changes: 10 additions & 12 deletions enum_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import (
"github.com/graphql-go/graphql/testutil"
)

func equalErrorMessage(expected, result *graphql.Result) bool {
return expected.Errors[0].Message == result.Errors[0].Message
}

var enumTypeTestColorType = graphql.NewEnum(graphql.EnumConfig{
Name: "Color",
Values: graphql.EnumValueConfigMap{
Expand Down Expand Up @@ -161,8 +165,7 @@ func TestTypeSystem_EnumValues_DoesNotAcceptStringLiterals(t *testing.T) {
},
}
result := executeEnumTypeTest(t, query)
t.Skipf("Pending `validator` implementation")
if !reflect.DeepEqual(expected, result) {
if !equalErrorMessage(expected, result) {
t.Fatalf("Unexpected result, Diff: %v", testutil.Diff(expected, result))
}
}
Expand All @@ -189,8 +192,7 @@ func TestTypeSystem_EnumValues_DoesNotAcceptInternalValueInPlaceOfEnumLiteral(t
},
}
result := executeEnumTypeTest(t, query)
t.Skipf("Pending `validator` implementation")
if !reflect.DeepEqual(expected, result) {
if !equalErrorMessage(expected, result) {
t.Fatalf("Unexpected result, Diff: %v", testutil.Diff(expected, result))
}
}
Expand All @@ -206,8 +208,7 @@ func TestTypeSystem_EnumValues_DoesNotAcceptEnumLiteralInPlaceOfInt(t *testing.T
},
}
result := executeEnumTypeTest(t, query)
t.Skipf("Pending `validator` implementation")
if !reflect.DeepEqual(expected, result) {
if !equalErrorMessage(expected, result) {
t.Fatalf("Unexpected result, Diff: %v", testutil.Diff(expected, result))
}
}
Expand Down Expand Up @@ -257,8 +258,7 @@ func TestTypeSystem_EnumValues_DoesNotAcceptInternalValueAsEnumVariable(t *testi
},
}
result := executeEnumTypeTestWithParams(t, query, params)
t.Skipf("Pending `validator` implementation")
if !reflect.DeepEqual(expected, result) {
if !equalErrorMessage(expected, result) {
t.Fatalf("Unexpected result, Diff: %v", testutil.Diff(expected, result))
}
}
Expand All @@ -276,8 +276,7 @@ func TestTypeSystem_EnumValues_DoesNotAcceptStringVariablesAsEnumInput(t *testin
},
}
result := executeEnumTypeTestWithParams(t, query, params)
t.Skipf("Pending `validator` implementation")
if !reflect.DeepEqual(expected, result) {
if !equalErrorMessage(expected, result) {
t.Fatalf("Unexpected result, Diff: %v", testutil.Diff(expected, result))
}
}
Expand All @@ -295,8 +294,7 @@ func TestTypeSystem_EnumValues_DoesNotAcceptInternalValueVariableAsEnumInput(t *
},
}
result := executeEnumTypeTestWithParams(t, query, params)
t.Skipf("Pending `validator` implementation")
if !reflect.DeepEqual(expected, result) {
if !equalErrorMessage(expected, result) {
t.Fatalf("Unexpected result, Diff: %v", testutil.Diff(expected, result))
}
}
Expand Down
1 change: 0 additions & 1 deletion introspection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,6 @@ func TestIntrospection_FailsAsExpectedOnThe__TypeRootFieldWithoutAnArg(t *testin
Schema: schema,
RequestString: query,
})
t.Skipf("Pending `validator` implementation")
if !reflect.DeepEqual(expected, result) {
t.Fatalf("Unexpected result, Diff: %v", testutil.Diff(expected, result))
}
Expand Down

0 comments on commit 5f9e0da

Please sign in to comment.