Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Delta Between Two Patch Sets: state/user_test.go

Issue 61620043: Started working on add/remove user support
Left Patch Set: Started working on add/remove user support Created 11 years ago
Right Patch Set: Started working on add/remove user support Created 11 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « state/user.go ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2013 Canonical Ltd. 1 // Copyright 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details. 2 // Licensed under the AGPLv3, see LICENCE file for details.
3 3
4 package state_test 4 package state_test
5 5
6 import ( 6 import (
7 jc "github.com/juju/testing/checkers"
7 gc "launchpad.net/gocheck" 8 gc "launchpad.net/gocheck"
8 9
9 "launchpad.net/juju-core/state" 10 "launchpad.net/juju-core/state"
10 jc "launchpad.net/juju-core/testing/checkers"
11 "launchpad.net/juju-core/utils" 11 "launchpad.net/juju-core/utils"
12 ) 12 )
13 13
14 type UserSuite struct { 14 type UserSuite struct {
15 ConnSuite 15 ConnSuite
16 } 16 }
17 17
18 var _ = gc.Suite(&UserSuite{}) 18 var _ = gc.Suite(&UserSuite{})
19 19
20 func (s *UserSuite) TestAddUserInvalidNames(c *gc.C) { 20 func (s *UserSuite) TestAddUserInvalidNames(c *gc.C) {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 c.Assert(u.PasswordValid(""), gc.Equals, false) 170 c.Assert(u.PasswordValid(""), gc.Equals, false)
171 171
172 } 172 }
173 173
174 func (s *UserSuite) TestCantDeactivateAdminUser(c *gc.C) { 174 func (s *UserSuite) TestCantDeactivateAdminUser(c *gc.C) {
175 u, err := s.State.User(state.AdminUser) 175 u, err := s.State.User(state.AdminUser)
176 c.Assert(err, gc.IsNil) 176 c.Assert(err, gc.IsNil)
177 err = u.Deactivate() 177 err = u.Deactivate()
178 c.Assert(err, gc.ErrorMatches, "Can't deactivate admin user") 178 c.Assert(err, gc.ErrorMatches, "Can't deactivate admin user")
179 } 179 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b