From 00b28812fb5ab68156ead5b45b66740a4d5ca688 Mon Sep 17 00:00:00 2001 From: Horus_Arch Date: Sun, 22 Feb 2015 17:20:18 +0100 Subject: Unit tests are now triggered by build tags. --- app/utilities_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/utilities_test.go') 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.") + } } -- cgit v1.2.3