Sha256: 248c1f59e28f754aa401937164106ad6db75fd6de76accead2ebef215ef4dd8b
Contents?: true
Size: 452 Bytes
Versions: 2
Compression:
Stored size: 452 Bytes
Contents
require 'spec_helper' describe GraphQL::Union do let(:type_1) { OpenStruct.new(kind: GraphQL::TypeKinds::OBJECT)} let(:type_2) { OpenStruct.new(kind: GraphQL::TypeKinds::OBJECT)} let(:union) { GraphQL::Union.new("MyUnion", "Some items", [type_1, type_2]) } it 'has a name' do assert_equal("MyUnion", union.name) end it 'infers type from an object' do assert_equal(CheeseType, DairyProductUnion.resolve_type(CHEESES[1])) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
graphql-0.3.0 | spec/graph_ql/types/union_spec.rb |
graphql-0.2.0 | spec/graph_ql/union_spec.rb |