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.

generate_test.go 296B

1234567891011121314151617181920
  1. package generate
  2. import (
  3. "os"
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. )
  7. func TestMain(m *testing.M) {
  8. retVal := m.Run()
  9. os.Exit(retVal)
  10. }
  11. func TestGetRandomString(t *testing.T) {
  12. randomString, err := GetRandomString(4)
  13. assert.NoError(t, err)
  14. assert.Len(t, randomString, 4)
  15. }