jonatack
3e4b6e34ab
Improve test method
...
- allow different operators & attributes for use with other tests
- replace `send("quoted_#{value}”)` with `quote(value)`
- cache #expected_query to a local var
2015-02-03 00:08:21 +01:00
jonatack
5009eeadb8
Test all the boolean true and false values.
...
These tests are meant to prevent changing the TRUE_VALUES and
FALSE_VALUES sets in RANSACK::CONSTANTS without a very good reason.
Previously, no test was alerting us against merging changes like #503 .
2015-02-02 18:23:45 +01:00
Jon Atack
64da8e17c0
Add tests for start/not_start/end/not_end predicates
2014-10-25 09:03:45 +02:00
Jon Atack
b6585a0110
Follow-up: Remove unneeded specs after fix.
2014-10-12 23:07:27 +02:00
Jon Atack
0fba76a741
Add predicate tests for lteq, lt, gteq, and gt
...
A regression was introduced in Rails 4.2/master (or Arel),
where lteq and lt predicates accept numeric input only and
blow up with string input.
Rails 3.x, 4.0 and 4.1 handled string input fine.
2014-10-12 21:48:03 +02:00
Pedro Chambino
752dc781b3
Add not_true and not_false predicates
2014-08-27 01:50:47 +01:00
Pedro Chambino
0ece3bec14
Make true and false predicates accept false values
...
This will make all boolean predicates more consistent.
2014-08-07 01:24:04 +01:00
irmiller22
9cd869431c
updated rspec gemspec version to 2.14.0, changed old should syntax to newer expect syntax
2014-05-15 14:29:46 -04:00
Artem Baguinski
82a42f0b47
present / blank predicates accept false
2014-05-12 17:10:52 +02:00
Artem Baguinski
e383f0cea7
null / not_null predicates accept false
2014-05-12 16:59:37 +02:00
jonatack
1e24b60906
Code cleanup
2013-12-15 13:30:27 +01:00
Ryan Bigg
b2149a1e13
Fix tests for MySQL
2013-11-06 17:43:23 +11:00
Ryan Bigg
6060acf870
Fix overly aggressive escaping on databases that are not PostgreSQL
...
I am unsure if this is necessary for any other databases.
Relevant to #171
Fixes #176
Fixes spree/spree#3936
2013-11-06 17:20:51 +11:00
jonatack
cb2ff12e34
Use more explicit ActiveRecord::VERSION::MAJOR
2013-08-06 00:17:24 +02:00
jonatack
87ad87abda
Prepare for Rails 4 compatibility with active_record versioning
2013-08-06 00:01:52 +02:00
Kevin Sjöberg
3926857976
Use Object#send to comply with Ruby 1.8.7
2013-02-06 14:25:37 +01:00
Kevin Sjöberg
53ef01b9e6
Fix issue #190 and #195
...
This resolves issues where an integer column would raise an exception
when handled by Ransack::Constants.escape_wildcards.
2013-02-06 11:26:06 +01:00
Kevin Sjöberg
40ded19968
Update Ransack::Constants#escape_wildcards
...
This updates Ransack::Constants#escape_wildcards to escape dots (.) as
well in order to bypass rails/rails#950 .
2013-01-30 16:29:02 +01:00
Kevin Sjöberg
6a11aac8e8
Fix Predicate spec for wildcard escaping
...
This fix reflects commit 71a3938a1c
.
2013-01-30 16:14:09 +01:00
labocho
fad3ac9921
Escape wildcard characters in LIKE clause
2012-11-26 13:39:40 +09:00
Ernie Miller
6fa15a20cd
Don't use present? to check for presence (allow false as value). Fixes #9
2011-07-17 10:46:30 -04:00
Jeff Iacono
ce0318cc78
Failing test for null / not_null predicate
...
Expected null to generate "IS NULL" and not_null to generate "IS NOT NULL"
Currently returns "= NULL" and "!= NULL" respectively
2011-07-15 03:06:21 -05:00
Ernie Miller
294015309b
Initial commit.
2011-03-30 20:31:39 -04:00