CyberCraftInc / vacation_system

Cyber Craft Vacation System
0 stars 0 forks source link

Fix precision in test expectations #53

Closed eleidan closed 8 years ago

eleidan commented 8 years ago

Test imrovement for VacationRequestsController#finish action method. The number of days to be subtracted must be an integer value. The number of accumulated days is based on a real number. To compare two numbers with different base is bad idea. So, number of accumulated days is coerced to integer value to avoid test fails, as follows:

  expected result to have changed by -3.0,
  but was changed by -3.0000000000000018
alazarchuk commented 8 years ago

lgtm