         doc.on 'remoteop', (op) ->
           test.deepEqual op, [{i:'hi', p:0}]
 
-          test.expect 4
-          test.done()
-
-        @model.applyOp @name, {v:0, op:[{i:'hi', p:0}]}, (version, error) ->
-          test.ifError error
+          test.expect 3
+          test.done()
+
+        @model.applyOp @name, {v:0, op:[{i:'hi', p:0}]}, (error, version) ->
+          test.fail error if error
 
     'get a nonexistent document passes null to the callback': (test) ->
       @c.openExisting @name, (doc) ->

          test.deepEqual op, sentOp
          passPart()

        @model.applyOp @name, {v:0, op:sentOp}, (version, error) ->
          test.ifError error
    
    'doc only fires change ops from locally sent ops': (test) ->
      passPart = makePassPart test, 2

          e = expectCalls 3, =>
            # The b's are successfully deleted, the ds are added by the server and the
            # op to delete the cs is denied.
            @model.getSnapshot @name, (error, {snapshot}) ->
              test.deepEqual snapshot, 'acdDCA'
              test.done()

