summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dgryski/dgoogauth/googauth_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/dgryski/dgoogauth/googauth_test.go')
-rw-r--r--vendor/github.com/dgryski/dgoogauth/googauth_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/dgryski/dgoogauth/googauth_test.go b/vendor/github.com/dgryski/dgoogauth/googauth_test.go
index 031922c47..43f35d2c9 100644
--- a/vendor/github.com/dgryski/dgoogauth/googauth_test.go
+++ b/vendor/github.com/dgryski/dgoogauth/googauth_test.go
@@ -1,7 +1,7 @@
package dgoogauth
import (
- "strconv"
+ "fmt"
"testing"
"time"
)
@@ -199,11 +199,11 @@ func TestAuthenticate(t *testing.T) {
t0 = int64(time.Now().Unix() / 30)
}
c := ComputeCode(otpconf.Secret, t0)
+ code := fmt.Sprintf("%06d", c)
- invalid := c + 1
attempts = []attempt{
- {strconv.Itoa(invalid), false},
- {strconv.Itoa(c), true},
+ {code + "1", false},
+ {code, true},
}
for _, a := range attempts {