1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Fixup tests

This commit is contained in:
Daniel Heath 2018-04-28 11:58:26 +10:00
parent 465e9c8e93
commit ff5c100cf8
2 changed files with 3 additions and 4 deletions

View File

@ -21,13 +21,13 @@ func TestListFiles(t *testing.T) {
t.Error("Expected three directory entries") t.Error("Expected three directory entries")
t.FailNow() t.FailNow()
} }
if n[0].Name != "testpage" { if n[0].Name() != "testpage" {
t.Error("Expected testpage to be first") t.Error("Expected testpage to be first")
} }
if n[1].Name != "testpage2" { if n[1].Name() != "testpage2" {
t.Error("Expected testpage2 to be second") t.Error("Expected testpage2 to be second")
} }
if n[2].Name != "testpage3" { if n[2].Name() != "testpage3" {
t.Error("Expected testpage3 to be last") t.Error("Expected testpage3 to be last")
} }
} }

View File

@ -23,7 +23,6 @@ func TestReverseList(t *testing.T) {
func TestHashing(t *testing.T) { func TestHashing(t *testing.T) {
p := HashPassword("1234") p := HashPassword("1234")
log.Debug(p)
err := CheckPasswordHash("1234", p) err := CheckPasswordHash("1234", p)
if err != nil { if err != nil {
t.Errorf("Should be correct password") t.Errorf("Should be correct password")