Skip to content

Commit

Permalink
Simplify test for client.AddCapability()
Browse files Browse the repository at this point in the history
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
  • Loading branch information
zyga committed Dec 3, 2015
1 parent fe8ddc2 commit db9343c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/client_test.go
Expand Up @@ -171,10 +171,9 @@ func (cs *clientSuite) TestClientAddCapability(c *check.C) {
}
err := cs.cli.AddCapability(cap)
c.Check(err, check.IsNil)
b, err := ioutil.ReadAll(cs.req.Body)
c.Check(err, check.IsNil)
var body map[string]interface{}
err = json.Unmarshal(b, &body)
decoder := json.NewDecoder(cs.req.Body)
err = decoder.Decode(&body)
c.Check(err, check.IsNil)
c.Check(body, check.DeepEquals, map[string]interface{}{
"name": "n",
Expand Down

0 comments on commit db9343c

Please sign in to comment.