Sha256: f90089fe6a55b73cc9497d23bfe20aa40bfdfe4b6c687ca1fc03ca8a694f73de
Contents?: true
Size: 1.03 KB
Versions: 3
Compression:
Stored size: 1.03 KB
Contents
require 'test_helper' class CassandraObject::FinderMethodsTest < CassandraObject::TestCase test 'first' do first_issue = Issue.create second_issue = Issue.create assert [first_issue, second_issue].include?(Issue.first) end test 'all' do first_issue = Issue.create second_issue = Issue.create assert_equal [first_issue, second_issue].to_set, Issue.all.to_set end test 'find_with_ids' do first_issue = Issue.create second_issue = Issue.create third_issue = Issue.create assert_equal [], Issue.find_with_ids([]) assert_equal first_issue, Issue.find_with_ids(first_issue.key) assert_equal [first_issue, second_issue].to_set, Issue.find_with_ids(first_issue.key, second_issue.key).to_set assert_equal [first_issue, second_issue].to_set, Issue.find_with_ids([first_issue.key, second_issue.key]).to_set end # test 'find single id' do # created_issue = Issue.create # # found_issue = Issue.find(created_issue.id) # # assert_equal created_issue, found_issue # end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gotime-cassandra_object-2.1.2 | test/finder_methods_test.rb |
gotime-cassandra_object-2.1.1 | test/finder_methods_test.rb |
gotime-cassandra_object-2.1.0 | test/finder_methods_test.rb |