1
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 34s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 34s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using FluentAssertions;
|
||||
|
||||
namespace WebApi.Test.Repository;
|
||||
namespace WebApi.Test.Repository;
|
||||
|
||||
public class BudgetArchiveRepositoryTest : RepositoryTestBase
|
||||
{
|
||||
@@ -19,7 +17,7 @@ public class BudgetArchiveRepositoryTest : RepositoryTestBase
|
||||
|
||||
var archive = await _repository.GetArchiveAsync(2023, 1);
|
||||
archive.Should().NotBeNull();
|
||||
archive!.Month.Should().Be(1);
|
||||
archive.Month.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using FluentAssertions;
|
||||
|
||||
namespace WebApi.Test.Repository;
|
||||
namespace WebApi.Test.Repository;
|
||||
|
||||
public class BudgetRepositoryTest : TransactionTestBase
|
||||
{
|
||||
@@ -58,9 +56,6 @@ public class BudgetRepositoryTest : TransactionTestBase
|
||||
await _repository.UpdateBudgetCategoryNameAsync("餐饮", "美食", TransactionType.Expense);
|
||||
|
||||
// Assert
|
||||
var b1 = await _repository.GetByIdAsync(1); // Assuming ID 1 (Standard FreeSql behavior depending on implementation, but I used standard Add)
|
||||
// Actually, IDs are snowflake. I should capture them.
|
||||
|
||||
var all = await _repository.GetAllAsync();
|
||||
var b1_updated = all.First(b => b.Name == "B1");
|
||||
b1_updated.SelectedCategories.Should().Contain("美食");
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using FluentAssertions;
|
||||
|
||||
namespace WebApi.Test.Repository;
|
||||
namespace WebApi.Test.Repository;
|
||||
|
||||
public class ConfigRepositoryTest : RepositoryTestBase
|
||||
{
|
||||
@@ -18,6 +16,6 @@ public class ConfigRepositoryTest : RepositoryTestBase
|
||||
|
||||
var config = await _repository.GetByKeyAsync("k1");
|
||||
config.Should().NotBeNull();
|
||||
config!.Value.Should().Be("v1");
|
||||
config.Value.Should().Be("v1");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using FluentAssertions;
|
||||
|
||||
namespace WebApi.Test.Repository;
|
||||
namespace WebApi.Test.Repository;
|
||||
|
||||
public class EmailMessageRepositoryTest : RepositoryTestBase
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using FluentAssertions;
|
||||
|
||||
namespace WebApi.Test.Repository;
|
||||
namespace WebApi.Test.Repository;
|
||||
|
||||
public class MessageRecordRepositoryTest : RepositoryTestBase
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using FluentAssertions;
|
||||
|
||||
namespace WebApi.Test.Repository;
|
||||
namespace WebApi.Test.Repository;
|
||||
|
||||
public class PushSubscriptionRepositoryTest : RepositoryTestBase
|
||||
{
|
||||
@@ -18,6 +16,6 @@ public class PushSubscriptionRepositoryTest : RepositoryTestBase
|
||||
|
||||
var sub = await _repository.GetByEndpointAsync("ep1");
|
||||
sub.Should().NotBeNull();
|
||||
sub!.Endpoint.Should().Be("ep1");
|
||||
sub.Endpoint.Should().Be("ep1");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using FreeSql;
|
||||
using WebApi.Test.Basic;
|
||||
|
||||
namespace WebApi.Test.Repository;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using FluentAssertions;
|
||||
|
||||
namespace WebApi.Test.Repository;
|
||||
namespace WebApi.Test.Repository;
|
||||
|
||||
public class TransactionCategoryRepositoryTest : TransactionTestBase
|
||||
{
|
||||
@@ -31,7 +29,7 @@ public class TransactionCategoryRepositoryTest : TransactionTestBase
|
||||
|
||||
var category = await _repository.GetByNameAndTypeAsync("C1", TransactionType.Expense);
|
||||
category.Should().NotBeNull();
|
||||
category!.Name.Should().Be("C1");
|
||||
category.Name.Should().Be("C1");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using FluentAssertions;
|
||||
|
||||
namespace WebApi.Test.Repository;
|
||||
namespace WebApi.Test.Repository;
|
||||
|
||||
public class TransactionPeriodicRepositoryTest : TransactionTestBase
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using FluentAssertions;
|
||||
|
||||
namespace WebApi.Test.Repository;
|
||||
namespace WebApi.Test.Repository;
|
||||
|
||||
public class TransactionRecordRepositoryTest : TransactionTestBase
|
||||
{
|
||||
@@ -20,7 +18,7 @@ public class TransactionRecordRepositoryTest : TransactionTestBase
|
||||
|
||||
var dbRecord = await _repository.GetByIdAsync(record.Id);
|
||||
dbRecord.Should().NotBeNull();
|
||||
dbRecord!.Amount.Should().Be(-100);
|
||||
dbRecord.Amount.Should().Be(-100);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user