Sha256: 0fe0aeaff2d97e665d2b519752a6c396c322bfa153a42ac0ab88c990d468c93a

Contents?: true

Size: 430 Bytes

Versions: 4

Compression:

Stored size: 430 Bytes

Contents

require 'spec_helper'

describe 'Ensure that we don\'t stomp on Active Record\'s queries' do
  describe '.where' do
    it 'generates IN clauses for non array columns' do
      query = Person.where(:id => [1,2,3]).to_sql

      query.should match /IN \(1, 2, 3\)/
    end
    it 'generates IN clauses for non array columns' do
      query = Person.where(:id => []).to_sql

      query.should match /IN \(NULL\)/
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
activerecord-postgis-array-0.3.4 spec/queries/sanity_spec.rb
postgres_ext-0.3.1 spec/queries/sanity_spec.rb
postgres_ext-0.3.0 spec/queries/sanity_spec.rb
postgres_ext-0.2.2 spec/queries/sanity_spec.rb