X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b9e0388a118e84f002ae0da6c7a31bdbd89a73bb..e5f339f3bb5b9bbea11d45a4f9c98c56c53d71ea:/test/oauth/test-mhlogin diff --git a/test/oauth/test-mhlogin b/test/oauth/test-mhlogin index b7287a41..682fbc86 100755 --- a/test/oauth/test-mhlogin +++ b/test/oauth/test-mhlogin @@ -18,7 +18,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 +39,7 @@ mhlogin: invalid response' # # TEST -echo 'mhlogin receives access and expiration' +start_test 'mhlogin receives access and expiration' expect_http_post_code @@ -52,14 +52,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" <