]> diplodocus.org Git - nmh/blobdiff - test/oauth/test-mhlogin
We have OAauth working! But the tests don't work yet.
[nmh] / test / oauth / test-mhlogin
index ed23e05cc60e17b8425bd1477b8682bd2b60f3d0..7454576b5c74653dffa0cd266de6a776f2fb1386 100755 (executable)
@@ -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