// Ensure that opening a transaction while the DB is closed returns an error. func TestDB_BeginRW_Closed(t *testing.T) { var db bolt.DB if _, err := db.Begin(true); err != bolt.ErrDatabaseNotOpen { t.Fatalf("unexpected error: %s", err) } }