Added test for #60

pull/91/head
Jordan Wright 2016-01-12 20:52:13 -06:00
parent fc6d556742
commit 25a7a32003
1 changed files with 6 additions and 0 deletions

View File

@ -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"}}