Sha256: bb73a99ed665a6d055b222fa590f9439c3096caeeac841e5b8fd1c9ffb8b5ee1
Contents?: true
Size: 523 Bytes
Versions: 28
Compression:
Stored size: 523 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe GraphQL::BOOLEAN_TYPE do describe "coerce_input" do def coerce_input(input) GraphQL::BOOLEAN_TYPE.coerce_isolated_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
28 entries across 28 versions & 1 rubygems