Sha256: bedd6f92e3dd002228e6d0370b0fb7858e9b9c238afc0eb39ecded5bc0f60a15

Contents?: true

Size: 581 Bytes

Versions: 4

Compression:

Stored size: 581 Bytes

Contents

require 'acceptance/spec_helper'

describe 'Searching for just instance Ids', :live => true do
  it "returns just the instance ids" do
    pancakes = Article.create! :title => 'Pancakes'
    waffles  = Article.create! :title => 'Waffles'
    index

    expect(Article.search_for_ids('pancakes').to_a).to eq([pancakes.id])
  end

  it "works across the global context" do
    article = Article.create! :title => 'Pancakes'
    book    = Book.create! :title => 'American Gods'
    index

    expect(ThinkingSphinx.search_for_ids.to_a).to match_array([article.id, book.id])
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thinking-sphinx-3.4.2 spec/acceptance/search_for_just_ids_spec.rb
thinking-sphinx-3.4.1 spec/acceptance/search_for_just_ids_spec.rb
thinking-sphinx-3.4.0 spec/acceptance/search_for_just_ids_spec.rb
thinking-sphinx-3.3.0 spec/acceptance/search_for_just_ids_spec.rb