Ejemplo n.º 1
0
func (s *UnsetSuite) TestInit(c *gc.C) {
	unsetCmd := environment.NewUnsetCommandForTest(s.fake)
	// Only empty is a problem.
	err := testing.InitCommand(unsetCmd, []string{})
	c.Assert(err, gc.ErrorMatches, "no keys specified")
	// Everything else is fine.
	err = testing.InitCommand(unsetCmd, []string{"something", "weird"})
	c.Assert(err, jc.ErrorIsNil)
}
Ejemplo n.º 2
0
func (s *UnsetSuite) run(c *gc.C, args ...string) (*cmd.Context, error) {
	command := environment.NewUnsetCommandForTest(s.fake)
	return testing.RunCommand(c, command, args...)
}