Sha256: cbfa6b213f8cd2ef9ba2de6f4ba9a9f13d4cf4e17ae699e77157853a830d263c

Contents?: true

Size: 495 Bytes

Versions: 17

Compression:

Stored size: 495 Bytes

Contents

# frozen_string_literal: true

require 'acceptance/spec_helper'

describe 'Update attributes automatically where possible', :live => true do
  it "updates boolean values" do
    article = Article.create :title => 'Pancakes', :published => false
    index

    expect(Article.search('pancakes', :with => {:published => true})).to be_empty

    article.published = true
    article.save

    expect(Article.search('pancakes', :with => {:published => true}).to_a)
      .to eq([article])
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
thinking-sphinx-5.6.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-5.5.1 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-5.5.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-5.4.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-5.3.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-5.2.1 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-5.2.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-5.1.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-5.0.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-4.4.1 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-4.4.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-4.3.2 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-4.3.1 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-4.3.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-4.2.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-4.1.0 spec/acceptance/attribute_updates_spec.rb
thinking-sphinx-4.0.0 spec/acceptance/attribute_updates_spec.rb