- Add commands pulled from hkccp import
- Ensure 0 <= discount <= 100
- Ensure a domain already assigned is not assigned again, and lower-case domain names
Details
- Reviewers
machniak - Group Reviewers
Restricted Project - Commits
- rK534d00000831: Cherry-picked contents from hkccp-import
No particular plan
Diff Detail
- Repository
- rK kolab
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/app/Console/Commands/WalletBalances.php | ||
---|---|---|
55 | How about "<id>: <balance> (<email>: <url>)"? | |
58 | The path will be '/user/<id>'. I think we need \App\Utils::serviceAdminUrl() (as we have serviceUrl() already) or add 2nd argument to serviceUrl(). | |
src/app/Console/Commands/WalletGetBalance.php | ||
40โ46 | \App\Wallet::find($this->argument('wallet')); | |
src/app/Console/Commands/WalletSetBalance.php | ||
14 | Should this command be available in production? Maybe not, then move it to app/Console/Development/DomainList.php | |
40โ47 | \App\Wallet::find($this->argument('wallet')); | |
src/app/Discount.php | ||
50 | We already have tests that expected an exception to be thrown. I think an exception would be better. 3) Tests\Feature\DiscountTest::testDiscountValueLessThanZero Failed asserting that exception of type "Exception" is thrown. 4) Tests\Feature\DiscountTest::testDiscountValueMoreThanHundred Failed asserting that exception of type "Exception" is thrown. | |
src/app/Domain.php | ||
65 | We need a test for this change. I also propose to throw an exception here. | |
73 | I propose to use an exception here. Would be good to test this too. |
- Simplify getting to the actual wallet
- Simplify getting to the wallet
- Fix test to meet expectations
src/app/Console/Commands/WalletBalances.php | ||
---|---|---|
58 | This is, for now, for our troubleshooting in the migration/transition though. What I want here is that the credit_debit_remaining and other such from the current HKCCP quickly refers to something I can click so as to get to the current HKCCP account page. | |
src/app/Discount.php | ||
50 | There's values in the HKCCP that go out of bounds, an exception would either need to be addressed there, as well as in every future interface, or just here. I'll fix the test though. |