Skip to content

#415: fee() must validate that tab is non-empty#427

Open
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:415
Open

#415: fee() must validate that tab is non-empty#427
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:415

Conversation

@VasilevNStas

Copy link
Copy Markdown
Contributor

Problem

fee(tab, amount, summary, job) checks that tab is not nil but never checks for empty string — unlike every other string parameter in this library.

Solution

  • Add raise(RuntimeError, "The \"tab\" may not be empty") if tab.empty? in BazaRb#fee
  • Add the same check in BazaRb::Fake#fee
  • Add test_fee_raises_when_tab_is_empty in both test files

Closes #415.

@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@yegor256 plz review this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fee() does not validate that tab is non-empty

1 participant