initial commit

This commit is contained in:
ston1th 2022-07-10 01:10:31 +02:00
commit f48fa210bb
49 changed files with 4058 additions and 0 deletions

25
pkg/otp/otp_test.go Normal file
View 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")
}
}