Skip to content

Commit 2cd25de

Browse files
MONGOId-5185 Remove tests for _id serialization (#5081)
1 parent 6ad02bf commit 2cd25de

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

spec/mongoid/document_spec.rb

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -430,27 +430,6 @@ class << self; attr_accessor :name; end
430430
Person.new(title: "Sir")
431431
end
432432

433-
describe 'id' do
434-
context 'rails < 6' do
435-
max_rails_version '5.2'
436-
437-
it 'is a BSON::ObjectId' do
438-
id = person.as_json['_id']
439-
expect(id).to be_a(BSON::ObjectId)
440-
end
441-
end
442-
443-
context 'rails >= 6' do
444-
min_rails_version '6.0'
445-
446-
it 'is a hash with $oid' do
447-
id = person.as_json['_id']
448-
expect(id).to be_a(Hash)
449-
expect(id['$oid']).to be_a(String)
450-
end
451-
end
452-
end
453-
454433
context "when no options are provided" do
455434

456435
it "does not apply any options" do

0 commit comments

Comments
 (0)