Sha256: cc122dee91c9297be2fafa561422b51b561cf6f7d0989ebe8be0887b2c6593a5
Contents?: true
Size: 443 Bytes
Versions: 10
Compression:
Stored size: 443 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe GraphQL::INT_TYPE do describe "coerce_input" do it "accepts ints and floats" do assert_equal 1, GraphQL::INT_TYPE.coerce_input(1) assert_equal 6, GraphQL::INT_TYPE.coerce_input(6.1) end it "rejects other types" do assert_equal nil, GraphQL::INT_TYPE.coerce_input("55") assert_equal nil, GraphQL::INT_TYPE.coerce_input(true) end end end
Version data entries
10 entries across 10 versions & 1 rubygems