feat: CDI % configurável por conta + fix mocks de teste
- Adiciona campo cdi_percentage (default 100%) na tabela accounts - Cálculo CDI aplica proporção: balance × (compound-1) × (pct/100) - Frontend exibe input de % quando yield_type=cdi e badge mostra valor - Corrige mocks de teste desatualizados (DeleteByMonth, isTax) - Corrige ConfirmIncome para rejeitar tipo expense (ErrRecurringNotIncome) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
@@ -33,13 +33,13 @@ func (m *mockCategoryRepo) GetByID(_ context.Context, id int) (*model.Category,
|
||||
return nil, repository.ErrNotFound
|
||||
}
|
||||
|
||||
func (m *mockCategoryRepo) Create(_ context.Context, name, color string) (*model.Category, error) {
|
||||
func (m *mockCategoryRepo) Create(_ context.Context, name, color string, _ bool) (*model.Category, error) {
|
||||
c := model.Category{ID: len(m.categories) + 1, Name: name, Color: color}
|
||||
m.categories = append(m.categories, c)
|
||||
return &c, nil
|
||||
}
|
||||
|
||||
func (m *mockCategoryRepo) Update(_ context.Context, id int, name, color string) (*model.Category, error) {
|
||||
func (m *mockCategoryRepo) Update(_ context.Context, id int, name, color string, _ bool) (*model.Category, error) {
|
||||
for i, c := range m.categories {
|
||||
if c.ID == id {
|
||||
m.categories[i].Name = name
|
||||
|
||||
Reference in New Issue
Block a user