X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/29ff4f879ba9eea142df4e8caf436d0dd933218c..be6dc542e0ee8fd684dce7531f128789a72e71f8:/test/oauth/test-mhlogin?ds=inline diff --git a/test/oauth/test-mhlogin b/test/oauth/test-mhlogin index ed23e05c..7454576b 100755 --- a/test/oauth/test-mhlogin +++ b/test/oauth/test-mhlogin @@ -314,6 +314,16 @@ http://127.0.0.1:${http_port}/oauth/auth?response_type=code&client_id=test-id&re EOF check "${MHTMPDIR}/$$.browser" "${MHTMPDIR}/$$.browser.expected" +# TEST +start_test 'empty authorization code' +run_test 'eval echo '' | mhlogin -saslmech xoauth2 -authservice test -user nobody@example.com' \ + "Load the following URL in your browser and authorize nmh to access test: + +http://127.0.0.1:${http_port}/oauth/auth?response_type=code&client_id=test-id&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=test-scope + +Enter the authorization code: Empty code; try again? " + + clean_fakehttp finish_test