package utils_test

import (
	"spaceofcheng/services/utils"
	"testing"
	"time"
)

func TestRandom(t *testing.T) {
	capEngine := utils.NewCaptchaEngine()
	r1 := capEngine.Random(6, "13823838438")
	time.Sleep(1 * time.Microsecond)
	r2 := capEngine.Random(6, "13823838438")

	if r1 == r2 {
		t.Fatalf("Test CaptchaEngine Random fail, %s", r2)
	}
}
