Sha256: 91645ce22d257bbce7baa03012e52f3dbaa19f80404a2e4a0c1a69814e1f8afa
Contents?: true
Size: 600 Bytes
Versions: 6
Compression:
Stored size: 600 Bytes
Contents
require "spec_helper" describe GraphQL::Query::Arguments do let(:arguments) { GraphQL::Query::Arguments.new({ a: 1, b: 2 }) } it 'returns keys as strings' do assert_equal(['a', 'b'], arguments.keys) end it 'delegates values to values hash' do assert_equal([1, 2], arguments.values) end it 'delegates each to values hash' do pairs = [] arguments.each do |key, value| pairs << [key, value] end assert_equal([['a', 1], ['b', 2]], pairs) end it 'returns original Ruby hash values with to_h' do assert_equal({ a: 1, b: 2 }, arguments.to_h) end end
Version data entries
6 entries across 6 versions & 1 rubygems