utils_test.go 478 B

1234567891011121314151617181920212223
  1. package utils_test
  2. import (
  3. "testing"
  4. . "github.com/onsi/ginkgo"
  5. . "github.com/onsi/gomega"
  6. "github.com/vladimirok5959/golang-utils/utils"
  7. )
  8. var _ = Describe("utils", func() {
  9. Context("RandomString", func() {
  10. It("generate random string with defined length", func() {
  11. Expect(len(utils.RandomString(10))).To(Equal(10))
  12. Expect(len(utils.RandomString(20))).To(Equal(20))
  13. })
  14. })
  15. })
  16. func TestSuite(t *testing.T) {
  17. RegisterFailHandler(Fail)
  18. RunSpecs(t, "utils")
  19. }