Browse Source

elbank-report now display empty string when transaction has no label

custom-labels
Damien Cassou 3 years ago
parent
commit
b2e0c70a91
No known key found for this signature in database GPG Key ID: A7123815F5DCE914
2 changed files with 4 additions and 1 deletions
  1. +1
    -1
      elbank-report.el
  2. +3
    -0
      test/elbank-report-test.el

+ 1
- 1
elbank-report.el View File

@ -459,7 +459,7 @@ Signal an error if there is no transaction at point."
"Return a button text with the label of TRANSACTION.
When clicking the button, jump to the transaction."
(with-temp-buffer
(insert (elbank-transaction-elt transaction 'label))
(insert (elbank-transaction-elt transaction 'label ""))
(make-text-button (point-at-bol) (point)
'follow-link t
'action


+ 3
- 0
test/elbank-report-test.el View File

@ -68,6 +68,9 @@
:to-have-been-called-with '(("cat1" . "2000")
("foo" . "1500")
("bar" . "500")) main-transaction))))
(describe "Representing transaction"
(it "with a nil label"
(expect (elbank-report--cell '((label)) 'label) :to-equal "")))
(provide 'elbank-report-test)
;;; elbank-report-test.el ends here

Loading…
Cancel
Save