You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
489 B
27 lines
489 B
package base64Captcha |
|
|
|
import "testing" |
|
|
|
func TestHandlerCaptchaGenerate(t *testing.T) { |
|
s := DefaultMemStore |
|
|
|
driver := &DriverString{ |
|
Height: 80, |
|
Width: 240, |
|
NoiseCount: 10, |
|
ShowLineOptions: 10, |
|
Length: 10, |
|
Source: "axclajsdlfkjalskjdglasdg", |
|
BgColor: nil, |
|
Fonts: nil, |
|
} |
|
|
|
c := NewCaptcha(driver, s) |
|
|
|
id, _, err := c.Generate() |
|
if err != nil { |
|
t.Fatalf("some error: %s", err) |
|
} |
|
|
|
t.Logf("id: %s", id) |
|
}
|
|
|