Sha256: d201289d409f7ca7c0137272396754f57a75b59ef7a6dfd460d2a7b1b7ec27d2

Contents?: true

Size: 631 Bytes

Versions: 1

Compression:

Stored size: 631 Bytes

Contents

require 'test_helper'

class ColumnDefaultServiceTest < ActiveSupport::TestCase
  test 'migration text for string' do
    migration = Ryakuzu::MigrationText.new('users', 'available', 'string', true)

    except = "remove_column :users, :available\nadd_column :users, :available, :string, default: 'true'"
    assert_equal except, migration.default_migration
  end

  test 'migration text for type' do
    migration = Ryakuzu::MigrationText.new('users', 'available', 'Integer', '')

    except = "remove_column :users, :available\nadd_column :users, :available, :integer"
    assert_equal except, migration.type_migration
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ryakuzu-0.3.0 test/services/column_default_service_test.rb