mongoid-filterable 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mongoid-filterable/filterable.rb +1 -0
- data/lib/mongoid-filterable/version.rb +1 -1
- data/spec/filterable_spec.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fde9d83b88b2d886f664e4b8f6259b211bcc8de3
|
4
|
+
data.tar.gz: e210953988bc2bf8d6312088f0d5c5242edf9f03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d785c82ca2ab77429e5c205d542e93bad551e98a5b65ef0d2bc3729a3250e245f166f4764ef6ea374a355cfd57ef94e21654734fba0f6fea0e13e34de18003f4
|
7
|
+
data.tar.gz: 5ecd66e9db4e1fdb733c36d75ddf9bb027718e4512b617f23bfb5bda63e2d0fee61df364d76dff1fc64e7a16218dbe090c615d7f9262f814239773415f11c743
|
data/spec/filterable_spec.rb
CHANGED
@@ -74,4 +74,12 @@ describe Mongoid::Filterable do
|
|
74
74
|
expect(City.filter({invalid: 'val'}).count).to eq(2)
|
75
75
|
end
|
76
76
|
end
|
77
|
+
|
78
|
+
context 'when filter params are nil' do
|
79
|
+
it 'should ignore filter' do
|
80
|
+
City.create(name: 'city1')
|
81
|
+
City.create(name: 'city2')
|
82
|
+
expect(City.filter(nil).count).to eq(2)
|
83
|
+
end
|
84
|
+
end
|
77
85
|
end
|