mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
fix tests
This commit is contained in:
parent
f313a5f221
commit
30bd94ee43
@ -105,13 +105,13 @@ namespace BTCPayServer.Tests
|
||||
tester.PayTester.DisableRegistration = true;
|
||||
await tester.StartAsync();
|
||||
var unauthClient = new BTCPayServerClient(tester.PayTester.ServerUri);
|
||||
await AssertHttpError(400,
|
||||
await AssertHttpError(422,
|
||||
async () => await unauthClient.CreateUser(new CreateApplicationUserRequest()));
|
||||
await AssertHttpError(400,
|
||||
await AssertHttpError(422,
|
||||
async () => await unauthClient.CreateUser(
|
||||
new CreateApplicationUserRequest() {Email = "test@gmail.com"}));
|
||||
// Pass too simple
|
||||
await AssertHttpError(400,
|
||||
await AssertHttpError(422,
|
||||
async () => await unauthClient.CreateUser(
|
||||
new CreateApplicationUserRequest() {Email = "test3@gmail.com", Password = "a"}));
|
||||
|
||||
@ -123,7 +123,7 @@ namespace BTCPayServer.Tests
|
||||
new CreateApplicationUserRequest() {Email = "test2@gmail.com", Password = "abceudhqw"});
|
||||
|
||||
// Duplicate email
|
||||
await AssertHttpError(400,
|
||||
await AssertHttpError(422,
|
||||
async () => await unauthClient.CreateUser(
|
||||
new CreateApplicationUserRequest() {Email = "test2@gmail.com", Password = "abceudhqw"}));
|
||||
|
||||
@ -375,16 +375,16 @@ namespace BTCPayServer.Tests
|
||||
//create payment request
|
||||
|
||||
//validation errors
|
||||
await AssertHttpError(400, async () =>
|
||||
await AssertHttpError(422, async () =>
|
||||
{
|
||||
await client.CreatePaymentRequest(user.StoreId, new CreatePaymentRequestRequest() {Title = "A"});
|
||||
});
|
||||
await AssertHttpError(400, async () =>
|
||||
await AssertHttpError(422, async () =>
|
||||
{
|
||||
await client.CreatePaymentRequest(user.StoreId,
|
||||
new CreatePaymentRequestRequest() {Title = "A", Currency = "BTC", Amount = 0});
|
||||
});
|
||||
await AssertHttpError(400, async () =>
|
||||
await AssertHttpError(422, async () =>
|
||||
{
|
||||
await client.CreatePaymentRequest(user.StoreId,
|
||||
new CreatePaymentRequestRequest() {Title = "A", Currency = "helloinvalid", Amount = 1});
|
||||
|
Loading…
Reference in New Issue
Block a user