Пример #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)
}
Пример #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...)
}