Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payroll: cover cases for moving extra pay from payday into accrued salary #913

Merged
merged 5 commits into from Jul 9, 2019

Conversation

Projects
None yet
3 participants
@sohkai
Copy link
Member

commented Jul 8, 2019

Modified a few of the tests to try and cover the case we had with payday()'s extra remainder salary being moved into the employee's accrued salary.

@sohkai sohkai requested a review from facuspagnuolo Jul 8, 2019

sohkai added some commits Jul 9, 2019

@sohkai sohkai marked this pull request as ready for review Jul 9, 2019

@coveralls

This comment has been minimized.

Copy link

commented Jul 9, 2019

Coverage Status

Coverage remained the same at 97.732% when pulling 6991e60 on payroll-extra-accrued-salary-tests into 9f40e08 on master.

@facuspagnuolo
Copy link
Contributor

left a comment

Nice job!

@@ -301,20 +309,13 @@ contract('Payroll payday', ([owner, employee, anyone]) => {

context('when the requested amount is lower than the total owed salary', () => {
context('when the requested amount represents less than a second of the earnings', () => {
const requestedAmount = salary.div(2)
const requestedAmount = salary.div(2).floor()

This comment has been minimized.

Copy link
@facuspagnuolo

facuspagnuolo Jul 9, 2019

Contributor

This is what I noticed yesterday, after turning the base salary to 1 USD per second, these amount calculations became flaky

Update future-apps/payroll/test/contracts/Payroll_payday.test.js
Co-Authored-By: Facu Spagnuolo <facuspagnuolo@users.noreply.github.com>

@sohkai sohkai merged commit efa101d into master Jul 9, 2019

2 of 5 checks passed

Travis CI - Branch Build Errored
Details
Travis CI - Pull Request Build Errored
Details
License Compliance FOSSA is analyzing this commit
Details
WIP Ready for review
Details
license/cla Contributor License Agreement is signed.
Details

@sohkai sohkai deleted the payroll-extra-accrued-salary-tests branch Jul 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.