diff options
| author | Horus_Arch | 2015-02-22 17:20:18 +0100 |
|---|---|---|
| committer | Horus_Arch | 2015-02-22 17:20:18 +0100 |
| commit | 00b28812fb5ab68156ead5b45b66740a4d5ca688 (patch) | |
| tree | 1db4545d5925943a1a761226ac378bb14d9204b7 /app/utilities_test.go | |
| parent | bdb2d33a30765a25be3dd8c82b92517efa00dda8 (diff) | |
| download | statuspage-00b28812fb5ab68156ead5b45b66740a4d5ca688.tar.gz | |
Unit tests are now triggered by build tags.
Diffstat (limited to 'app/utilities_test.go')
| -rw-r--r-- | app/utilities_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/utilities_test.go b/app/utilities_test.go index 7037b2f..5405309 100644 --- a/app/utilities_test.go +++ b/app/utilities_test.go @@ -1,3 +1,5 @@ +// +build all general + package main import ( @@ -30,4 +32,13 @@ func TestPassword(t *testing.T) { if !verify { t.Fatal("Verifying password failed.") } + + testHash, err = HashPassword("") + if err == nil { + t.Fatal("Accepting empty password.") + } + verify = VerifyPassword("", testHash) + if verify { + t.Fatal("Verifying empty password.") + } } |
