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