From e54d0da392119e75788f3d5a431b85e931a7e824 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Fri, 4 Sep 2015 16:56:18 -0700 Subject: Adding unit tests for cmd line --- model/user_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'model/user_test.go') diff --git a/model/user_test.go b/model/user_test.go index 32a6f9b78..190e5826e 100644 --- a/model/user_test.go +++ b/model/user_test.go @@ -199,6 +199,15 @@ func TestRoles(t *testing.T) { t.Fatal() } - //IsInRole + if IsValidRoles("junk") { + t.Fatal() + } + if IsInRole("system_admin junk", "admin") { + t.Fatal() + } + + if !IsInRole("system_admin junk", "system_admin") { + t.Fatal() + } } -- cgit v1.2.3-1-g7c22