191
191
c.Check(stderr, gc.Equals, "")
195
func (s *ListCharmSuite) TestChannelFlag(c *gc.C) {
196
fp1, err := charmresource.GenerateFingerprint(strings.NewReader("abc"))
197
c.Assert(err, jc.ErrorIsNil)
198
fp2, err := charmresource.GenerateFingerprint(strings.NewReader("xyz"))
199
c.Assert(err, jc.ErrorIsNil)
200
resources := []charmresource.Resource{
201
charmRes(c, "website", ".tgz", ".tgz of your website", string(fp1.Bytes())),
202
charmRes(c, "music", ".mp3", "mp3 of your backing vocals", string(fp2.Bytes())),
204
s.client.ReturnListResources = [][]charmresource.Resource{resources}
205
command := NewListCharmResourcesCommand(s.client)
207
code, _, stderr := runCmd(c, command,
208
"--channel", "development",
212
c.Check(code, gc.Equals, 0)
213
c.Check(stderr, gc.Equals, "")
214
c.Check(command.channel, gc.Equals, "development")