From 61609db9ef05859039620c033252ffe2f384e79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 1 Oct 2020 17:21:35 +0200 Subject: [PATCH] Cover HTTP 402 in oauth tests --- auth/oauth_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/auth/oauth_test.go b/auth/oauth_test.go index 3c9e23043..a9070a1b1 100644 --- a/auth/oauth_test.go +++ b/auth/oauth_test.go @@ -188,6 +188,15 @@ func Test_detectDeviceFlow(t *testing.T) { doFallback: true, wantErr: "", }, + { + name: "402 payment required", + args: args{ + statusCode: 402, + values: nil, + }, + doFallback: false, + wantErr: "error: HTTP 402", + }, { name: "400 bad request", args: args{