     clickToolbarButton attribute: "quote", ->
       pasteContent "text/html", "<div>Hello world<br></div><pre>This is a test</pre>", ->
         document = getDocument()
-        equal 2, document.getBlockCount()
+        equal document.getBlockCount(), 2
 
         block = document.getBlockAtIndex(0)
-        deepEqual ["quote"], block.getAttributes()
+        deepEqual block.getAttributes(), ["quote"],
         equal block.toString(), "abcHello world\n"
 
         block = document.getBlockAtIndex(1)
-        deepEqual ["quote", "code"], block.getAttributes()
+        deepEqual block.getAttributes(), ["quote", "code"]
         equal block.toString(), "This is a test\n"
 
         done()

        pressKey "backspace", ->
          pasteContent "text/html", "<ul><li>a<ul><li>b</li></ul></li></ul>", ->
          document = getDocument()
          equal 3, document.getBlockCount()

          block = document.getBlockAtIndex(0)
          deepEqual ["bulletList", "bullet"], block.getAttributes()
          equal block.toString(), "a\n"

          block = document.getBlockAtIndex(1)
          deepEqual ["bulletList", "bullet", "bulletList", "bullet"], block.getAttributes()
          equal block.toString(), "b\n"

          block = document.getBlockAtIndex(2)
          deepEqual ["bulletList", "bullet"], block.getAttributes()
          equal block.toString(), "zz\n"
          done()


        expandSelection "left", ->
          pasteContent "text/html", "<ul><li>a<ul><li>b</li></ul></li></ul>", ->
          document = getDocument()
          equal document.getBlockCount(), 3

          block = document.getBlockAtIndex(0)
          deepEqual block.getAttributes(), ["bulletList", "bullet"]
          equal block.toString(), "a\n"

          block = document.getBlockAtIndex(1)
          deepEqual block.getAttributes(), ["bulletList", "bullet", "bulletList", "bullet"]
          equal block.toString(), "b\n"

          block = document.getBlockAtIndex(2)
          deepEqual block.getAttributes(), ["bulletList", "bullet"]
          equal block.toString(), "zz\n"
          done()

