Sha256: 3d6236978200c06d1f9fa3346e58ab955a274aa142dbe4235525d72b54aa1a87

Contents?: true

Size: 538 Bytes

Versions: 9

Compression:

Stored size: 538 Bytes

Contents

require 'spec_helper'

describe GraphQL::Relay::BaseConnection do

  describe ".connection_for_nodes" do

    it "resolves most specific connection type" do
      class SpecialArray < Array; end
      class SpecialArrayConnection < GraphQL::Relay::BaseConnection; end
      GraphQL::Relay::BaseConnection.register_connection_implementation(SpecialArray, SpecialArrayConnection)

      nodes = SpecialArray.new

      GraphQL::Relay::BaseConnection.connection_for_nodes(nodes)
        .must_equal SpecialArrayConnection
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
graphql-1.2.6 spec/graphql/relay/base_connection_spec.rb
graphql-1.2.5 spec/graphql/relay/base_connection_spec.rb
graphql-1.2.4 spec/graphql/relay/base_connection_spec.rb
graphql-1.2.3 spec/graphql/relay/base_connection_spec.rb
graphql-1.2.2 spec/graphql/relay/base_connection_spec.rb
graphql-1.2.1 spec/graphql/relay/base_connection_spec.rb
graphql-1.2.0 spec/graphql/relay/base_connection_spec.rb
graphql-1.1.0 spec/graphql/relay/base_connection_spec.rb
graphql-1.0.0 spec/graphql/relay/base_connection_spec.rb