mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Fixup tests
This commit is contained in:
parent
465e9c8e93
commit
ff5c100cf8
@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user