Sha256: 093c652745ed98dba41cf54bbe12e0d808f0561e05c7ca24c3fa7bdde8e359a1

Contents?: true

Size: 226 Bytes

Versions: 13

Compression:

Stored size: 226 Bytes

Contents

require 'spec_helper'

describe GraphQL::EnumType do
  let(:enum) { DairyAnimalEnum }

  it 'coerces names to underlying values' do
    assert_equal("YAK", enum.coerce("YAK"))
    assert_equal(1, enum.coerce("COW"))
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
graphql-0.9.5 spec/graphql/enum_type_spec.rb
graphql-0.9.4 spec/graphql/enum_type_spec.rb
graphql-0.9.3 spec/graphql/enum_type_spec.rb
graphql-0.9.2 spec/graphql/enum_type_spec.rb
graphql-0.8.1 spec/graphql/enum_type_spec.rb
graphql-0.8.0 spec/graphql/enum_type_spec.rb
graphql-0.7.1 spec/graphql/enum_type_spec.rb
graphql-0.7.0 spec/graphql/enum_type_spec.rb
graphql-0.6.2 spec/graphql/enum_type_spec.rb
graphql-0.6.1 spec/graphql/enum_type_spec.rb
graphql-0.6.0 spec/graphql/enum_type_spec.rb
graphql-0.5.0 spec/graph_ql/enum_type_spec.rb
graphql-0.4.0 spec/graph_ql/enum_type_spec.rb