export testing

This commit is contained in:
Your Name 2024-01-02 10:16:30 -05:00
parent 7f52ef7aad
commit 7214e0a73f
2 changed files with 2 additions and 3 deletions

View File

@ -37,7 +37,7 @@ func main() {
os.Exit(1) os.Exit(1)
} }
scsusers.Init(db, "test", "Example Test", "nobody@nowhere.com", "localhost:25") scsusers.Init(db, "test", "Example Test", "nobody@nowhere.com", "localhost:25", true)
a:=scsusers.UsernameAvailable("testuser") a:=scsusers.UsernameAvailable("testuser")
fmt.Printf("Initial test of username available: %v\n", a) fmt.Printf("Initial test of username available: %v\n", a)
a=scsusers.Register("testuser", email, "127.0.0.1") a=scsusers.Register("testuser", email, "127.0.0.1")

View File

@ -12,7 +12,6 @@ import (
func TestUsers(t *testing.T) { func TestUsers(t *testing.T) {
var email string var email string
c.Testing = true
generatePassword(16) generatePassword(16)
flag.StringVar(&email, "email", "", "Email address to use for registration test") flag.StringVar(&email, "email", "", "Email address to use for registration test")
flag.Parse() flag.Parse()
@ -38,7 +37,7 @@ func TestUsers(t *testing.T) {
os.Exit(1) os.Exit(1)
} }
Init(db, "test", "Example Test", "nobody@nowhere.com", "localhost:25") Init(db, "test", "Example Test", "nobody@nowhere.com", "localhost:25", true)
a := UsernameAvailable("testuser") a := UsernameAvailable("testuser")
fmt.Printf("Initial test of username available: %v\n", a) fmt.Printf("Initial test of username available: %v\n", a)
a = Register("testuser", email, "127.0.0.1") a = Register("testuser", email, "127.0.0.1")