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

sohkai
Copy link
Contributor

@sohkai sohkai 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 July 8, 2019 22:24
@sohkai sohkai marked this pull request as ready for review July 9, 2019 09:22
@coveralls
Copy link

Coverage Status

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

Copy link
Contributor

@facuspagnuolo facuspagnuolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

future-apps/payroll/test/contracts/Payroll_payday.test.js Outdated Show resolved Hide resolved
@@ -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()
Copy link
Contributor

@facuspagnuolo facuspagnuolo Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Co-Authored-By: Facu Spagnuolo <facuspagnuolo@users.noreply.github.com>
@sohkai sohkai merged commit efa101d into master Jul 9, 2019
@sohkai sohkai deleted the payroll-extra-accrued-salary-tests branch July 9, 2019 15:07
ramilexe pushed a commit to ConsiderItDone/aragon-apps that referenced this pull request Dec 9, 2021
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.

3 participants