diff --git a/executor_test.go b/executor_test.go index a4a4ba8..698cbd3 100644 --- a/executor_test.go +++ b/executor_test.go @@ -58,3 +58,17 @@ func TestSQLExecutor_Down(t *testing.T) { assert.NotNil(t, err) }) } + +func TestSQLExecutor_Down_Broken(t *testing.T) { + td := filepath.Join(dbSrc, "20180920181906_migration_with_an_error") + + exe := NewSQLExecutor(db) + + migration, err := MigrationFromBytes(td, ioutil.ReadFile) + assert.Nil(t, err) + + cleanState(func() { + err := exe.Down(migration, new(testingStore)) + assert.Error(t, err) + }) +}