~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/cmd/juju/user/add_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
        // Block operation
126
126
        s.mockAPI.blocked = true
127
127
        _, err := s.run(c, "foobar", "Foo Bar")
128
 
        c.Assert(err, gc.ErrorMatches, cmd.ErrSilent.Error())
129
 
        // msg is logged
130
 
        stripped := strings.Replace(c.GetTestLog(), "\n", "", -1)
131
 
        c.Check(stripped, gc.Matches, ".*To enable changes.*")
 
128
        testing.AssertOperationWasBlocked(c, err, ".*To enable changes.*")
132
129
}
133
130
 
134
131
func (s *UserAddCommandSuite) TestAddUserErrorResponse(c *gc.C) {