From 793e866850d8c7b30bce402b697493d5fccaf637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Montes?= Date: Tue, 22 Sep 2020 17:50:35 +0200 Subject: [PATCH] Using assert.Regexp for testing stderr's content --- pkg/cmd/auth/login/login_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/auth/login/login_test.go b/pkg/cmd/auth/login/login_test.go index 53439ef8e..0abfeb7e3 100644 --- a/pkg/cmd/auth/login/login_test.go +++ b/pkg/cmd/auth/login/login_test.go @@ -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) })