Sha256: 1079b4f28603889808fefe8a1de1392683374767db2a205436b7c19c963b6cd4

Contents?: true

Size: 464 Bytes

Versions: 4

Compression:

Stored size: 464 Bytes

Contents

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

4 entries across 4 versions & 1 rubygems

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