Using assert.Regexp for testing stderr's content

This commit is contained in:
Martín Montes 2020-09-22 17:50:35 +02:00
parent 81caade918
commit 793e866850

View file

@ -439,7 +439,7 @@ func Test_loginRun_Survey(t *testing.T) {
if tt.wantErrOut == nil {
assert.Equal(t, "", stderr.String())
} else {
assert.True(t, tt.wantErrOut.MatchString(stderr.String()))
assert.Regexp(t, tt.wantErrOut, stderr.String())
}
reg.Verify(t)
})