func TestCreateExpense_Validation(t *testing.T) {
	tx := dbtest.BeginTx()
	defer tx.Rollback()

	_, err := service.CreateExpense(logger.Discard, tx, service.CreateExpenseParams{
		Description: "",
		Amount:      0,
	})

	assert.MustBeEqual(t, "ValidationError: Description: must be present, Amount: must be greater than 0", err.Error())

	cnt, err := db.CountExpenses(tx)
	assert.MustBeNil(t, err)
	assert.Equal(t, 0, cnt)
}
func TestCreateExpense_Success(t *testing.T) {
	tx := dbtest.BeginTx()
	defer tx.Rollback()

	expense, err := service.CreateExpense(logger.Discard, tx, service.CreateExpenseParams{
		Description: "Peter Lustig",
		Amount:      42,
	})

	assert.MustBeNil(t, err)
	assert.Equal(t, "Peter Lustig", expense.Description)
	assert.Equal(t, 42, expense.Amount)

	cnt, err := db.CountExpenses(tx)
	assert.MustBeNil(t, err)
	assert.Equal(t, 1, cnt)
}