This commit is contained in:
36
Authentication/Auth.cs
Normal file
36
Authentication/Auth.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Xunit;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using FluentAssertions;
|
||||
|
||||
namespace raven_integration
|
||||
{
|
||||
|
||||
public class Auth
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async void BadLoginShouldNotWork()
|
||||
{
|
||||
//Expect status code 401 and result:
|
||||
// {{
|
||||
// "error": {
|
||||
// "code": "2003",
|
||||
// "message": "Authentication failed"
|
||||
// }
|
||||
// }}
|
||||
|
||||
dynamic d = new JObject();
|
||||
d.login = "BOGUS";
|
||||
d.password = "ACCOUNT";
|
||||
ApiResponse a = await Util.PostAsync("Auth", null, d.ToString());
|
||||
Util.ValidateErrorCodeResponse(a,2003,401);
|
||||
}
|
||||
|
||||
//==================================================
|
||||
|
||||
}//eoc
|
||||
}//eons
|
||||
|
||||
Reference in New Issue
Block a user