Sha256: 9c78a3abba1a57c7d164fdcd18e9e039410742296017296cacd732187a55add5

Contents?: true

Size: 586 Bytes

Versions: 1

Compression:

Stored size: 586 Bytes

Contents

require File.expand_path('spec_helper', File.dirname(__FILE__))

describe 'join' do
  it 'should search by join' do
    session.search PhotoContainer do
      with(:caption, 'blah')
    end
    connection.should have_last_search_including(
      :fq, "{!join from=photo_container_id to=id}caption_s:blah")
  end

  it 'should greater_than search by join' do
    session.search PhotoContainer do
      with(:photo_rating).greater_than(3)
    end
    connection.should have_last_search_including(
      :fq, "{!join from=photo_container_id to=id}average_rating_ft:{3\\.0 TO *}")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sunspot-2.1.1 spec/api/query/join_spec.rb