 
 
             PreviouslyUnencryptedModelMigrated.findById @docId, (err, migratedDoc) =>
-              console.log(migratedDoc)
               assert.equal err, null, 'There should be no authentication error after migrated'
               assert.propertyVal migratedDoc, 'text', 'Plain'
               assert.propertyVal migratedDoc, 'bool', true

          assert.property doc.children[0], '_id'
          assert.notProperty doc.children[0], '_ct'
          done()
        , done
        .end()

    describe 'when child field is in additionalAuthenticatedFields on parent and child documents are tampered with by swapping their ciphertext', ->
      it 'should pass an error', (done) ->

          _id: @parentDoc._id
          'children._ct': $exists: true
          'children.text': $exists: false
        , (err, docs) ->
          assert.equal err, null
          assert.lengthOf docs, 1
          assert.propertyVal docs[0].children[0], 'text', 'Child unencrypted text'
          done()

    describe 'document.find()', ->
      it 'when parent doc found, should pass an unencrypted version of the embedded document to the callback', (done) ->
        @ParentModel.findById @parentDoc._id
        , (err, doc) ->
          assert.equal err, null
          assert.propertyVal doc, 'text', 'Unencrypted text'
          assert.isArray doc.children
          assert.isObject doc.children[0]
