Example #1
0
func (s *DisableUserSuite) TestEnable(c *gc.C) {
	username := "******"
	enableCommand, _ := user.NewEnableCommandForTest(s.mock, s.store)
	_, err := testing.RunCommand(c, enableCommand, username)
	c.Assert(err, jc.ErrorIsNil)
	c.Assert(s.mock.enable, 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)
}