Sha256: d40815b3ec81222ef3df90a9f98d6ddc8363cf5c16a699256727a2f6e79c77f7

Contents?: true

Size: 651 Bytes

Versions: 16

Compression:

Stored size: 651 Bytes

Contents

require 'test_helper'

class SqlImportTest < ActiveSupport::TestCase

  def setup
    clean_db
  end

  test "import" do
    assert_equal RailsDb::Database.tables, ["accounts", "comments", "contacts", "legacy_accounts", "payments", "projects", "projects_users", "users"]
    file = File.open("#{Rails.root}/../test_sql_#{RailsDb::Database.adapter.adapter_name}.sql")
    importer = RailsDb::SqlImport.new(file)
    importer.import
    assert importer.result.ok?, "Import successfull?"
    assert_equal RailsDb::Database.tables, ["accounts", "comments", "contacts", "legacy_accounts", "payments", "projects", "projects_users", 't', "users"]
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rails_db-1.4.0 test/sql_import_test.rb
rails_db-1.3.4 test/sql_import_test.rb
rails_db-1.3.3 test/sql_import_test.rb
rails_db-1.3.2 test/sql_import_test.rb
rails_db-1.3.1 test/sql_import_test.rb
rails_db-1.3 test/sql_import_test.rb
rails_db-1.1.1 test/sql_import_test.rb
rails_db-1.1 test/sql_import_test.rb
rails_db-1.0 test/sql_import_test.rb
rails_db-0.9.9 test/sql_import_test.rb
rails_db-0.9 test/sql_import_test.rb
rails_db-0.8 test/sql_import_test.rb
rails_db-0.7.2 test/sql_import_test.rb
rails_db-0.7.1 test/sql_import_test.rb
rails_db-0.7 test/sql_import_test.rb
rails_db-0.6 test/sql_import_test.rb