Open platform to collect and prioritize feedback
add testing for util
goenning593484204c55
diff --git a/app/util/crypto_test.go b/app/util/crypto_test.gonew file mode 100644index 000000000..631178802--- /dev/null+++ b/app/util/crypto_test.go@@ -0,0 +1,16 @@+package util_test++import (+ "testing"++ "github.com/WeCanHearYou/wchy/app/util"+ . "github.com/onsi/gomega"+)++func TestMD5(t *testing.T) {+ RegisterTestingT(t)++ encrypted := util.MD5("jonsnow")++ Expect(encrypted).To(Equal("5a665206e6374a1b3b95e05d1ae9ecd8"))+}diff --git a/app/util/http_test.go b/app/util/http_test.gonew file mode 100644index 000000000..9f3048846--- /dev/null+++ b/app/util/http_test.go@@ -0,0 +1,15 @@+package util_test++import (+ "testing"++ "github.com/WeCanHearYou/wchy/app/util"+ . "github.com/onsi/gomega"+)++func TestStripPort(t *testing.T) {+ RegisterTestingT(t)++ Expect(util.StripPort("mydomain.com:5000")).To(Equal("mydomain.com"))+ Expect(util.StripPort("mydomain.com")).To(Equal("mydomain.com"))+}