Sha256: b8d2a3445fa3d4971e7b842468dc51bee1b86c0e45d56d8fa8dc5b472df6f845

Contents?: true

Size: 555 Bytes

Versions: 12

Compression:

Stored size: 555 Bytes

Contents

require 'helper'

class TestClassMethods < Test::Unit::TestCase
  should "respond to query call" do
    assert Book.respond_to?("query")
  end

  should "find record with book name" do
    book = Book.create(:name => "Otherland", :author => "Tad Williams")
    assert Cleo.create(book)
    book_cleo_id = book.cleo_id
    assert Cleo.find(book_cleo_id)

    assert Cleo.delete(book_cleo_id), "Didn't Delete"
  end

  should "be able to query from Klass" do
    books = Book.query("goog")
    assert_not_nil books
    assert_kind_of Array, books
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
acts_as_cleo-2.4.5 test/unit/test_class_methods.rb
acts_as_cleo-2.4.4 test/unit/test_class_methods.rb
acts_as_cleo-2.4.3 test/unit/test_class_methods.rb
acts_as_cleo-2.4.2 test/unit/test_class_methods.rb
acts_as_cleo-2.4.1 test/unit/test_class_methods.rb
acts_as_cleo-2.4.0 test/unit/test_class_methods.rb
acts_as_cleo-2.3.0 test/unit/test_class_methods.rb
acts_as_cleo-2.2.1 test/unit/test_class_methods.rb
acts_as_cleo-2.2.0 test/unit/test_class_methods.rb
acts_as_cleo-2.1.2 test/unit/test_class_methods.rb
acts_as_cleo-2.1.1 test/unit/test_class_methods.rb
acts_as_cleo-2.1.0 test/unit/test_class_methods.rb