Sha256: 90a37bbb7eecf48523a0bb275b90a971afd2beef38f25e19597332cf898f8130

Contents?: true

Size: 641 Bytes

Versions: 24

Compression:

Stored size: 641 Bytes

Contents

require 'test_helper'

class MigrationTest < CassandraObjectTestCase
  test "a new invoice should have the right schema version" do
    i = mock_invoice
    assert_equal 2, i.schema_version
  end
  
  test " a new invoice should have an empty gst_number" do
    assert_equal nil, mock_invoice.gst_number
  end
  
  test "an old invoice should get fetched and updated" do
    key = Invoice.next_key.to_s
    connection.insert(Invoice.column_family, key, {"schema_version"=>"1", "number"=>"200", "total"=>"150.35"})
    
    invoice = Invoice.get(key)
    assert_equal 2, invoice.schema_version
    assert_equal 150.35, invoice.total
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
gotime-cassandra_object-2.2.0 test-old/migration_test.rb
gotime-cassandra_object-2.1.2 test-old/migration_test.rb
gotime-cassandra_object-2.1.1 test-old/migration_test.rb
gotime-cassandra_object-2.1.0 test-old/migration_test.rb
gotime-cassandra_object-2.0.0 test-old/migration_test.rb
gotime-cassandra_object-0.9.1 test/migration_test.rb
gotime-cassandra_object-0.9.0 test/migration_test.rb
gotime-cassandra_object-0.8.7 test/migration_test.rb
gotime-cassandra_object-0.8.6 test/migration_test.rb
gotime-cassandra_object-0.8.5 test/migration_test.rb
gotime-cassandra_object-0.8.4 test/migration_test.rb
gotime-cassandra_object-0.8.3 test/migration_test.rb
gotime-cassandra_object-0.8.2 test/migration_test.rb
gotime-cassandra_object-0.8.1 test/migration_test.rb
gotime-cassandra_object-0.8.0 test/migration_test.rb
gotime-cassandra_object-0.7.8 test/migration_test.rb
gotime-cassandra_object-0.7.7 test/migration_test.rb
gotime-cassandra_object-0.7.6 test/migration_test.rb
gotime-cassandra_object-0.7.5 test/migration_test.rb
gotime-cassandra_object-0.7.4 test/migration_test.rb