Sha256: 1a4023fe4a324d9e2137fa88e766919f812bf0cbb758874146189d71d0c9eefa

Contents?: true

Size: 674 Bytes

Versions: 2

Compression:

Stored size: 674 Bytes

Contents

require "#{File.dirname(File.expand_path(__FILE__))}/../../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 => Author.create(:name => "Tad Williams"))
    assert Cleo::ElementServer.create(book)
    book_cleo_id = book.cleo_id
    assert Cleo::ElementServer.find(book_cleo_id)

    assert Cleo::ElementServer.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

2 entries across 2 versions & 1 rubygems

Version Path
acts_as_cleo-3.0.2 test/unit/acts_as_cleo/test_class_methods.rb
acts_as_cleo-3.0.1 test/unit/acts_as_cleo/test_class_methods.rb