mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-04 05:43:27 +01:00
test: tidy misplaced, stale, and redundant tests (#691)
Tests now sit beside the code they cover; ones a golden or another test already pins are gone, and core tests gain the assertions a real regression would trip.
This commit is contained in:
1 parent
7e6f325508
commit
2e7ee3c69f
54 files changed
+913
-1509
No files matched your search
@@ -39,8 +39,13 @@ func TestOpen(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOpen_JournalOff(t *testing.T) {
|
||||
path := createDB(t, "CREATE TABLE t (v TEXT)", "INSERT INTO t VALUES ('x')")
|
||||
assert.Equal(t, "x", readValue(t, path, JournalOff))
|
||||
database, err := Open(createDB(t, "CREATE TABLE t (v TEXT)"), JournalOff)
|
||||
require.NoError(t, err)
|
||||
defer database.Close()
|
||||
|
||||
var mode string
|
||||
require.NoError(t, database.QueryRow("PRAGMA journal_mode").Scan(&mode))
|
||||
assert.Equal(t, "off", mode)
|
||||
}
|
||||
|
||||
func TestOpen_ReadOnlyImmutable(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user