initial commit
This commit is contained in:
commit
f48fa210bb
49 changed files with 4058 additions and 0 deletions
25
pkg/otp/otp_test.go
Normal file
25
pkg/otp/otp_test.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2022 Marius Schellenberger
|
||||
|
||||
package otp
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
_, err := New("admin", "example.com")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestImageSecretFromURL(t *testing.T) {
|
||||
r, _ := New("admin", "example.com")
|
||||
_, secret, err := ImageSecretFromURL(r.URL)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if secret != r.Secret {
|
||||
t.Error("secret is not equal")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue