From 25a7a32003a1dd510bb3a85725008f82038c3fe6 Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Tue, 12 Jan 2016 20:52:13 -0600 Subject: [PATCH] Added test for #60 --- models/models_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/models/models_test.go b/models/models_test.go index 3e3e5077..99fd3a00 100644 --- a/models/models_test.go +++ b/models/models_test.go @@ -28,6 +28,12 @@ func (s *ModelsSuite) TestGetUser(c *check.C) { c.Assert(u.Username, check.Equals, "admin") } +func (s *ModelsSuite) TestGeneratedAPIKey(c *check.C) { + u, err := GetUser(1) + c.Assert(err, check.Equals, nil) + c.Assert(u.ApiKey, check.Not(check.Equals), "12345678901234567890123456789012") +} + func (s *ModelsSuite) TestPostGroup(c *check.C) { g := Group{Name: "Test Group"} g.Targets = []Target{Target{Email: "test@example.com"}}