Skip to content

Commit

Permalink
add missing test case for #3
Browse files Browse the repository at this point in the history
  • Loading branch information
ba0f3 committed Sep 25, 2023
1 parent aaa5399 commit e324a40
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_issue4.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import otp
var totp = newTotp("GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ")
assert totp.at(1111111111) == 50471
assert totp.at(1234567890) == 5924
assert totp.at(2000000000) == 279037

assert totp.verify(50471, 1111111111)
let token = totp.now()
assert totp.verify(token)

0 comments on commit e324a40

Please sign in to comment.