Add tests to ensure numericality validator with greater_than and less_then options works (currently failing) #171

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

starim commented Feb 25, 2014

When using money-rails 0.9.0 in a project, the numericality validator with the greater_than option didn't appear to be doing any validation, so I checked out the money-rails project and examined the tests. The existing tests only check that numericality validation is rejecting non-numeric values, so I added tests to check that the greater_than and less_than options are working on monetized fields as described in the readme.

These tests are currently failing. It looks like the numericality validator on monetized fields is ignoring the greater_than or less_than options.

Ideally I wouldn't dump failing tests on you, but I don't have enough familiarity with money-rails to fix the issue myself.

Brent Houghton added some commits Feb 24, 2014

Brent Houghton Add a test for a currency value of 0 passing validation, even with a …
…greater_than validator requiring a value greater than zero.
8f71053
Brent Houghton Add tests that the greater_than and less_than numericality validation…
…s work on monetized model properties.
52f76df
Owner

semmons99 commented Apr 21, 2014

I'd gladly merge once you figure out the build failures.

semmons99 closed this Nov 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment