Example #1
0
func (s *DisableUserSuite) TestDisable(c *gc.C) {
	username := "******"
	disableCommand, _ := user.NewDisableCommandForTest(s.mock, s.store)
	_, err := testing.RunCommand(c, disableCommand, username)
	c.Assert(err, jc.ErrorIsNil)
	c.Assert(s.mock.disable, gc.Equals, username)
}
Example #2
0
func (s *DisableUserSuite) TestInit(c *gc.C) {
	wrappedCommand, command := user.NewEnableCommandForTest(nil, s.store)
	s.testInit(c, wrappedCommand, command)
	wrappedCommand, command = user.NewDisableCommandForTest(nil, s.store)
	s.testInit(c, wrappedCommand, command)
}