Esempio n. 1
0
func (s *S) TestFakeAppUnbindUnitNotBound(c *check.C) {
	var unit provision.Unit
	app := NewFakeApp("sou", "otm", 0)
	err := app.UnbindUnit(&unit)
	c.Assert(err, check.NotNil)
	c.Assert(err.Error(), check.Equals, "not bound")
}
Esempio n. 2
0
func (s *S) TestFakeAppUnbindUnit(c *check.C) {
	var unit provision.Unit
	app := NewFakeApp("sou", "otm", 0)
	err := app.BindUnit(&unit)
	c.Assert(err, check.IsNil)
	err = app.UnbindUnit(&unit)
	c.Assert(err, check.IsNil)
	c.Assert(app.HasBind(&unit), check.Equals, false)
}