Add go backend
This commit is contained in:
18
api/test/middleware/basicauth_test.go
Normal file
18
api/test/middleware/basicauth_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package middleware_test
|
||||
|
||||
import (
|
||||
"magmise/middleware"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCheckPasswordHash(t *testing.T) {
|
||||
password := "password"
|
||||
hash, _ := middleware.HashPassword(password)
|
||||
if middleware.CheckPasswordHash(password, hash) == false {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func TestBasicAuth(t *testing.T) {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user