Sha256: 8b303e30d73b4a0df57628e92c82eccbd937c08b43b5de6c0f5625dfaeb056af
Contents?: true
Size: 484 Bytes
Versions: 45
Compression:
Stored size: 484 Bytes
Contents
require "spec_helper" describe GraphQL::BOOLEAN_TYPE do describe "coerce_input" do def coerce_input(input) GraphQL::BOOLEAN_TYPE.coerce_input(input) end it "accepts true and false" do assert_equal true, coerce_input(true) assert_equal false, coerce_input(false) end it "rejects other types" do assert_equal nil, coerce_input("true") assert_equal nil, coerce_input(5.5) assert_equal nil, coerce_input(nil) end end end
Version data entries
45 entries across 45 versions & 1 rubygems