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-0.7.3 test/migration_test.rb
gotime-cassandra_object-0.7.2 test/migration_test.rb
gotime-cassandra_object-0.7.1 test/migration_test.rb
gotime-cassandra_object-0.6.1 test/migration_test.rb