X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b9e0388a118e84f002ae0da6c7a31bdbd89a73bb..6db45651:/test/oauth/test-mhlogin?ds=sidebyside diff --git a/test/oauth/test-mhlogin b/test/oauth/test-mhlogin index b7287a41..c4a7bf2d 100755 --- a/test/oauth/test-mhlogin +++ b/test/oauth/test-mhlogin @@ -10,6 +10,8 @@ fi . "${srcdir}/test/oauth/common.sh" +check_exit '-eq 1' mhlogin - + expect_no_creds() { cat /dev/null > "${MHTMPDIR}/$$.expected-creds" cat /dev/null > "${MHTMPDIR}/oauth-test" @@ -18,7 +20,7 @@ expect_no_creds() { test_mhlogin() { start_fakehttp - run_test 'eval echo code | mhlogin -oauth test' \ + run_test 'eval echo code | 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 @@ -39,7 +41,7 @@ mhlogin: invalid response' # # TEST -echo 'mhlogin receives access and expiration' +start_test 'mhlogin receives access and expiration' expect_http_post_code @@ -52,14 +54,14 @@ fake_json_response < ${MHTMPDIR}/$$.browser" 2>&1 1>/dev/null | \ + sed 's/\( endpoint:\) .*/\1/' > "${MHTMPDIR}/$$.mhlogin.err" +cat > "${MHTMPDIR}/$$.mhlogin.err.expected" < "${MHTMPDIR}/$$.browser.expected" <