File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
spec/mongoid/criteria/queryable Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -417,6 +417,17 @@ def localized?
417
417
end
418
418
end
419
419
420
+ context "and raw_value cannot be converted by bson-ruby" do
421
+
422
+ before do
423
+ selector . send ( method , "key" , Mongoid ::RawValue ( 4 ..5 ) )
424
+ end
425
+
426
+ it "returns the raw_value without conversion" do
427
+ expect ( selector [ "key" ] ) . to eq ( 4 ..5 )
428
+ end
429
+ end
430
+
420
431
context "and raw_value is a complex type" do
421
432
config_override :map_big_decimal_to_decimal128 , true
422
433
@@ -665,6 +676,17 @@ def localized?
665
676
end
666
677
end
667
678
679
+ context "and raw_value cannot be converted by bson-ruby" do
680
+
681
+ before do
682
+ selector . send ( method , "key" , Mongoid ::RawValue ( 4 ..5 ) )
683
+ end
684
+
685
+ it "returns the raw_value without conversion" do
686
+ expect ( selector [ "key" ] ) . to eq ( 4 ..5 )
687
+ end
688
+ end
689
+
668
690
context "and raw_value is a complex type" do
669
691
670
692
before do
You can’t perform that action at this time.
0 commit comments