Sha256: 0e737e442c3f7e29e6898aae90f5f72f487217fa73650dee0bbcd6fabb58cc97

Contents?: true

Size: 475 Bytes

Versions: 1

Compression:

Stored size: 475 Bytes

Contents

require 'test_helper'

class RecordTest < ActiveSupport::TestCase

  setup do
    Indices.build
  end

  teardown do
    Indices.destroy
  end

  test 'indexing' do
    shop = Shop.create(name: 'Anderstons')
    product = shop.products.create(name: 'Les Paul', category: 'Gibson')
    product.run_callbacks :commit
    sleep 2

    assert_equal 1, Product.search.count
    product.destroy
    product.run_callbacks :commit
    assert_equal 0, Product.search.count
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
indices-0.0.1 test/record_test.rb