blob: 57d96c303e84d97076815421d9c0f85c147200b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package main
import (
"testing"
)
func TestCreateNewEntry(t *testing.T) {
if testing.Short() || !*testExternal {
t.Skip("Skipping test to avoid external network.")
}
err := CreateNewEntry("foobar@example.org", "password")
if err != nil {
t.Fatal(err)
}
err = CreateNewEntry("foo", "")
if err == nil {
t.Fatal("CreateNewEntry: Allow wrong input, error is nil.")
}
}
|