This commit is contained in:
2019-01-17 23:28:22 +00:00
parent bebbbb3613
commit 1c93f55370

View File

@@ -26,9 +26,33 @@ namespace raven_integration
d.login = "BOGUS";
d.password = "ACCOUNT";
ApiResponse a = await Util.PostAsync("Auth", null, d.ToString());
Util.ValidateErrorCodeResponse(a,2003,401);
Util.ValidateErrorCodeResponse(a, 2003, 401);
}
/// <summary>
///
/// </summary>
[Fact]
public async void JWTExpiredTokenShouldFail()
{
//Valid auth token but expired:
var ValidButExpiredToken="Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOiIxNTQ0NTU5NzAwIiwiZXhwIjoiMTU0NzE1MTcwMCIsImlzcyI6ImF5YW5vdmEuY29tIiwiaWQiOiIxIiwiYXlhbm92YS9yb2xlcyI6IjMyNzY3In0.fMq_8Dvia63rzN_U2zjczPvUNM40OEAeI4VOeV6ulGw";
//Expect status code 401 and result:
// {{
// "error": {
// "code": "2003",
// "message": "Authentication failed"
// }
// }}
ApiResponse a = await Util.GetAsync("Locale/picklist", ValidButExpiredToken);//lowest level test user because there are no limits on this route except to be authenticated
Util.ValidateHTTPStatusCode(a, 401);
}
//==================================================
}//eoc