You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
570 B

package main
import (
"log"
"testing"
"git.sporestack.com/SporeStack/settlers"
)
func TestEnable(t *testing.T) {
db, err := dbConnect(testConfiguration)
if err != nil {
return
}
defer db.Close()
depositToken := settlers.DepositToken(testToken)
userErr, err := enable(testToken, testToken, depositToken, db, testConfiguration)
if err != nil {
t.Error(err.Error())
} else if userErr != settlers.ErrorIncorrectAdminToken {
t.Error("Did not give incorrect admin token error for invalid token.")
} else {
log.Print("We secure enable properly.")
}
}