We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8611d9a commit 5eb3e60Copy full SHA for 5eb3e60
spec/mongoid/criteria_spec.rb
@@ -3126,6 +3126,19 @@ def self.ages; self; end
3126
end
3127
3128
3129
+
3130
+ context "when searching for a regex on a symbol field" do
3131
+ let!(:person) { Person.create!(species: :hello)}
3132
+ let(:criteria) { Person.where(species: /ell/) }
3133
3134
+ it "creates the correct criteria" do
3135
+ expect(criteria.selector).to eq({ "species" => /ell/ })
3136
+ end
3137
3138
+ it "finds the document" do
3139
+ expect(criteria.first).to eq(person)
3140
3141
3142
3143
3144
describe "#for_js" do
0 commit comments