mirror of https://github.com/grafana/grafana
Merge pull request #12815 from tariq1890/url_query_fix
Fixing bug in url query reader and added test casespull/12733/merge
commit
89298d0cf5
@ -0,0 +1,22 @@ |
||||
package util |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
. "github.com/smartystreets/goconvey/convey" |
||||
) |
||||
|
||||
func TestIsEmail(t *testing.T) { |
||||
|
||||
Convey("When validating a string that is a valid email", t, func() { |
||||
result := IsEmail("abc@def.com") |
||||
|
||||
So(result, ShouldEqual, true) |
||||
}) |
||||
|
||||
Convey("When validating a string that is not a valid email", t, func() { |
||||
result := IsEmail("abcdef.com") |
||||
|
||||
So(result, ShouldEqual, false) |
||||
}) |
||||
} |
Loading…
Reference in new issue