func (*EnvironInfoTest) TestEmptyUser(c *gc.C) { info := &fakeEnvironInfo{} c.Assert(juju.EnvironInfoUserTag(info), gc.Equals, names.NewUserTag(configstore.DefaultAdminUsername)) }
func (*EnvironInfoTest) TestRealUser(c *gc.C) { info := &fakeEnvironInfo{user: "******"} c.Assert(juju.EnvironInfoUserTag(info), gc.Equals, names.NewUserTag("eric")) }
func (*EnvironInfoTest) TestNullInfo(c *gc.C) { c.Assert(juju.EnvironInfoUserTag(nil), gc.Equals, names.NewUserTag(configstore.DefaultAdminUsername)) }