Files
cheesy-arena-lite/database_test.go

22 lines
378 B
Go
Raw Normal View History

2014-05-24 00:39:22 -07:00
// Copyright 2014 Team 254. All Rights Reserved.
// Author: pat@patfairbank.com (Patrick Fairbank)
package main
import (
"github.com/stretchr/testify/assert"
2014-05-24 17:58:57 -07:00
"os"
2014-05-24 00:39:22 -07:00
"testing"
)
2014-05-24 17:58:57 -07:00
const testDbPath = "test.db"
func clearDb() {
os.Remove(testDbPath)
}
2014-05-24 00:39:22 -07:00
func TestOpenUnreachableDatabase(t *testing.T) {
_, err := OpenDatabase("nonexistentdir/test.db")
assert.NotNil(t, err)
2014-05-24 00:39:22 -07:00
}