Sha256: 3c0ddaf414aee6e700dd4810b495af3fe5463650307f70317ac3b5d5d6eff0a9

Contents?: true

Size: 465 Bytes

Versions: 7

Compression:

Stored size: 465 Bytes

Contents

require 'spec_helper'
module Alf
  module Sequel
    describe Connection, 'keys' do

      context "when only a primary key" do
        subject{ sap.keys(:parts) }

        let(:expected){ Keys[ [:pid] ] }

        it{ should eq(expected) }
      end

      context "when both primary key and unique index" do
        subject{ sap.keys(:suppliers) }

        let(:expected){ Keys[ [:sid], [:name] ] }

        it{ should eq(expected) }
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
alf-sequel-0.16.3 spec/connection/test_keys.rb
alf-sequel-0.16.2 spec/connection/test_keys.rb
alf-sequel-0.16.1 spec/connection/test_keys.rb
alf-sequel-0.16.0 spec/connection/test_keys.rb
alf-sequel-0.15.0 spec/connection/test_keys.rb
alf-sequel-0.14.0 spec/connection/test_keys.rb
alf-sequel-0.13.0 spec/connection/test_keys.rb