Sha256: f132a12817cb37e93ff41ea55db9df46d45e5afb1456e90eb23fb108fd21724e

Contents?: true

Size: 589 Bytes

Versions: 29

Compression:

Stored size: 589 Bytes

Contents

require 'spec_helper'

describe GraphQL::Schema::FieldValidator do
  let(:field_defn) {{
    name: "Field",
    description: "Invalid field",
    deprecation_reason: nil,
    arguments: {symbol_arg: nil},
    type: DairyAnimalEnum,
  }}
  let(:field) {
    f = OpenStruct.new(field_defn)
    def f.to_s; f.name; end
    f
  }
  let(:errors) { e = []; GraphQL::Schema::FieldValidator.new.validate(field, e); e }
  it "requires argument names to be strings" do
    expected = ["Field.arguments keys must be Strings, but some aren't: symbol_arg"]
    assert_equal(expected, errors)
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
graphql-0.12.1 spec/graphql/schema/field_validator_spec.rb
graphql-0.12.0 spec/graphql/schema/field_validator_spec.rb
graphql-0.11.1 spec/graphql/schema/field_validator_spec.rb
graphql-0.11.0 spec/graphql/schema/field_validator_spec.rb
graphql-0.10.9 spec/graphql/schema/field_validator_spec.rb
graphql-0.10.8 spec/graphql/schema/field_validator_spec.rb
graphql-0.10.7 spec/graphql/schema/field_validator_spec.rb
graphql-0.10.6 spec/graphql/schema/field_validator_spec.rb
graphql-0.10.5 spec/graphql/schema/field_validator_spec.rb
graphql-0.10.4 spec/graphql/schema/field_validator_spec.rb
graphql-0.10.3 spec/graphql/schema/field_validator_spec.rb
graphql-0.10.2 spec/graphql/schema/field_validator_spec.rb
graphql-0.10.1 spec/graphql/schema/field_validator_spec.rb
graphql-0.10.0 spec/graphql/schema/field_validator_spec.rb
graphql-0.9.5 spec/graphql/schema/field_validator_spec.rb
graphql-0.9.4 spec/graphql/schema/field_validator_spec.rb
graphql-0.9.3 spec/graphql/schema/field_validator_spec.rb
graphql-0.9.2 spec/graphql/schema/field_validator_spec.rb
graphql-0.8.1 spec/graphql/schema/field_validator_spec.rb
graphql-0.8.0 spec/graphql/schema/field_validator_spec.rb