Sha256: 6e0b4cf71599ea3560616adfdc2b5c8417b2f0da38a9ad6d4e2bdf9232990d2b

Contents?: true

Size: 569 Bytes

Versions: 3

Compression:

Stored size: 569 Bytes

Contents

require 'acceptance/spec_helper'

describe 'Updates to records in real-time indices', :live => true do
  it "handles fields with unicode nulls" do
    product = Product.create! :name => "Widget \u0000"

    expect(Product.search.first).to eq(product)
  end unless ENV['DATABASE'] == 'postgresql'

  it "handles attributes for sortable fields accordingly" do
    product = Product.create! :name => 'Red Fish'
    product.update_attributes :name => 'Blue Fish'

    expect(Product.search('blue fish', :indices => ['product_core']).to_a).
      to eq([product])
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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