18 lines
393 B
Go
18 lines
393 B
Go
package gomcaptcha
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestGoMcaptcha(t *testing.T) {
|
|
|
|
salt := "56126a526f6f1e6728e904d8b574ebb8"
|
|
phrase := "ef055efeac72b99ed24af687e49d6ec7"
|
|
difficulty := uint(50000)
|
|
|
|
res := ProveWork(salt, phrase, difficulty)
|
|
assert.True(t, res.IsSufficientDifficulty(salt, difficulty))
|
|
assert.True(t, res.IsValidProof(phrase, salt))
|
|
}
|