         doc.insert 0, 'hi', =>
           test.strictEqual doc.getText(), 'hi'
 
-          @model.getSnapshot @name, (data) ->
+          @model.getSnapshot @name, (error, data) ->
             test.strictEqual data.snapshot, 'hi'
             doc.close()
             test.done()

          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, ({snapshot}) ->
              test.deepEqual snapshot, 'acdDCA'
              test.done()


          test.deepEqual op, sentOp
          passPart()

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