X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/74e48ffefe5f68a2b065d8e970448ba38514185f..7934d6196251675f4d2ab6c2e4efae42e9c1192a:/test/oauth/test-mhlogin?ds=inline diff --git a/test/oauth/test-mhlogin b/test/oauth/test-mhlogin index 7f2bcc4a..e1ecb20a 100755 --- a/test/oauth/test-mhlogin +++ b/test/oauth/test-mhlogin @@ -254,6 +254,20 @@ expect_no_creds test_mhlogin 'mhlogin: error exchanging code for OAuth2 token mhlogin: bad OAuth request; re-run with -snoop and send REDACTED output to nmh-workers' +# TEST +start_test 'mhlogin -browser' + +run_test "eval echo code | mhlogin -saslmech xoauth2 -authservice test\ + -browser 'echo \$@ > ${MHTMPDIR}/$$.browser'" \ +"Follow the prompts in your browser to authorize nmh to access test. +Enter the authorization code: mhlogin: error exchanging code for OAuth2 token +mhlogin: error making HTTP request to OAuth2 authorization endpoint: Failed to connect to 127.0.0.1 port ${http_port}: Connection refused" + +cat > "${MHTMPDIR}/$$.browser.expected" <