Fix tests.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 00:02:57 +0200
2 files changed,
5 insertions(+),
5 deletions(-)
M
captcha_test.go
→
captcha_test.go
@@ -6,18 +6,18 @@ "testing"
) func TestNew(t *testing.T) { - c := New(StdLength) + c := New() if c == "" { t.Errorf("expected id, got empty string") } } func TestVerify(t *testing.T) { - id := New(StdLength) + id := New() if Verify(id, []byte{0, 0}) { t.Errorf("verified wrong captcha") } - id = New(StdLength) + id = New() d := globalStore.Get(id, false) // cheating if !Verify(id, d) { t.Errorf("proper captcha not verified")@@ -25,7 +25,7 @@ }
} func TestReload(t *testing.T) { - id := New(StdLength) + id := New() d1 := globalStore.Get(id, false) // cheating Reload(id) d2 := globalStore.Get(id, false) // cheating again
M
store_test.go
→
store_test.go
@@ -43,7 +43,7 @@ for i := range ids {
ids[i] = uniuri.New() s.Set(ids[i], d) } - s.Collect() + s.(*memoryStore).collect() // Must be already collected nc := 0 for i := range ids {