Add tests
This commit is contained in:
1 parent
d5127c7405
commit
88aaaecb1a
15 files changed
+1755
-34
No files matched your search
@@ -3,9 +3,9 @@ using BudgetApp.Data;
|
||||
|
||||
namespace BudgetApp.Services;
|
||||
|
||||
public class CategoryService
|
||||
public class CategoryService(ApplicationDbContext db)
|
||||
{
|
||||
private readonly ApplicationDbContext _db;
|
||||
private readonly ApplicationDbContext _db = db;
|
||||
|
||||
private static readonly (string Name, string Icon)[] DefaultCategories =
|
||||
[
|
||||
@@ -26,11 +26,6 @@ public class CategoryService
|
||||
("Gifts", "🎁")
|
||||
];
|
||||
|
||||
public CategoryService(ApplicationDbContext db)
|
||||
{
|
||||
_db = db;
|
||||
}
|
||||
|
||||
public async Task<List<Category>> GetCategoriesAsync(string userId)
|
||||
{
|
||||
return await _db.Categories
|
||||
|
||||
Reference in new issue
Block a user