         done()
 
 editorTest "expand selection over attachment", (done) ->
-  getComposition().insertFile(createFile())
+  insertFile(createFile())
   assertLocationRange([0,1])
   expandSelection "left", ->
     assertLocationRange([0,0], [0,1])

        done()

editorTest "expand selection over attachment and text", (done) ->
  getComposition().insertString("a")
  getComposition().insertFile(createFile())
  getComposition().insertString("b")
  assertLocationRange([0,3])
  expandSelection "left", ->
    assertLocationRange([0,2], [0,3])

editorModule "Cursor movement", template: "editor_empty"

editorTest "move cursor around attachment", (done) ->
  insertFile(createFile())
  assertLocationRange([0,1])
  moveCursor "left", ->
    assertLocationRange([0,0])
