test/unit/migrations_test.rb in foca-integrity-0.1.9.2 vs test/unit/migrations_test.rb in foca-integrity-0.1.9.3
- old
+ new
@@ -22,27 +22,28 @@
require "integrity/migrations"
end
before(:each) do
[Project, Build, Commit, Notifier].each(&:auto_migrate_down!)
+ database_adapter.execute("DROP TABLE migration_info")
assert !table_exists?("migration_info") # just to be sure
end
test "upgrading a pre migration database" do
capture_stdout { Integrity.migrate_db }
- current_migrations.should == ["initial", "add_commits"]
+ current_migrations.should == ["initial", "add_commits", "add_enabled_column"]
assert table_exists?("integrity_projects")
assert table_exists?("integrity_builds")
assert table_exists?("integrity_notifiers")
assert table_exists?("integrity_commits")
end
test "migrating data from initial to add_commits migration" do
load_initial_migration_fixture
capture_stdout { Integrity.migrate_db }
- current_migrations.should == ["initial", "add_commits"]
+ current_migrations.should == ["initial", "add_commits", "add_enabled_column"]
sinatra = Project.first(:name => "Sinatra")
sinatra.should have(1).commits
sinatra.commits.first.should be_successful
sinatra.commits.first.output.should =~ /sinatra/