helpers_test.go 662 B

1234567891011121314151617181920212223242526272829303132
  1. package helpers_test
  2. import (
  3. "testing"
  4. . "github.com/onsi/ginkgo"
  5. . "github.com/onsi/gomega"
  6. "github.com/vladimirok5959/golang-utils/utils/http/helpers"
  7. )
  8. var _ = Describe("helpers", func() {
  9. Context("MinifyHtmlCode", func() {
  10. It("minify Html code", func() {
  11. Expect(helpers.MinifyHtmlCode(`
  12. <!doctype html>
  13. <html lang="uk">
  14. <head>
  15. <meta charset="utf-8" />
  16. </head>
  17. <body>
  18. Index
  19. </body>
  20. </html>
  21. `)).To(Equal(`<!doctype html><html lang="uk"><head><meta charset="utf-8" /></head><body>Index</body></html>`))
  22. })
  23. })
  24. })
  25. func TestSuite(t *testing.T) {
  26. RegisterFailHandler(Fail)
  27. RunSpecs(t, "helpers")
  28. }