Skip to content

Commit

Permalink
Payroll: Improve rates handling unit test for ETH
Browse files Browse the repository at this point in the history
  • Loading branch information
facuspagnuolo committed Apr 26, 2019
1 parent a9f3a07 commit 174bea7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions future-apps/payroll/test/contracts/Payroll_rates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ contract('Payroll rates handling,', ([owner, employee, anyone]) => {
})

beforeEach('set rates and allow tokens', async () => {
const DAI_TO_ETH_RATE = formatRate(DAI_RATE.div(ETH_RATE)) // 0.050 ETH
const ANT_TO_ETH_RATE = formatRate(ANT_RATE.div(ETH_RATE)) // 0.025 ETH
const ETH_TO_DAI_RATE = formatRate(ETH_RATE.div(DAI_RATE)) // 20 DAI
const ETH_TO_ANT_RATE = formatRate(ETH_RATE.div(ANT_RATE)) // 40 ANT

await setTokenRate(priceFeed, ETH, DAI, DAI_TO_ETH_RATE)
await setTokenRate(priceFeed, ETH, ANT, ANT_TO_ETH_RATE)
await setTokenRate(priceFeed, DAI, ETH, ETH_TO_DAI_RATE)
await setTokenRate(priceFeed, ANT, ETH, ETH_TO_ANT_RATE)

await payroll.addAllowedToken(ETH, { from: owner })
await payroll.addAllowedToken(DAI.address, { from: owner })
Expand Down

0 comments on commit 174bea7

Please sign in to comment.