     advanceClock()
     expect(Actions.insertAttachmentIntoDraft).toHaveBeenCalled()
     expect(@upload.inline).toEqual(true)
-
-xdescribe "when the DraftStore `isSending` isn't stubbed out", ->
-  beforeEach ->
-    DraftStore._draftsSending = {}
-
-  it "doesn't send twice in a popout", ->
-    spyOn(Actions, "queueTask")
-    spyOn(Actions, "sendDraft").andCallThrough()
-    useFullDraft.call(@)
-    makeComposer.call(@)
-
-    firstStatus = @composer._isValidDraft()
-    expect(firstStatus).toBe true
-    Actions.sendDraft(DRAFT_CLIENT_ID)
-    secondStatus = @composer._isValidDraft()
-    expect(secondStatus).toBe false
-
-  it "doesn't send twice in the main window", ->
-    spyOn(Actions, "queueTask")
-    spyOn(Actions, "sendDraft").andCallThrough()
-    spyOn(NylasEnv, "isMainWindow").andReturn true
-    useFullDraft.call(@)
-    makeComposer.call(@)
-    firstStatus = @composer._isValidDraft()
-    expect(firstStatus).toBe true
-    Actions.sendDraft(DRAFT_CLIENT_ID)
-    secondStatus = @composer._isValidDraft()
-    expect(secondStatus).toBe false

  )
  advanceClock()

xdescribe "ComposerView", ->
  beforeEach ->
    ComposerEditor.containerRequired = false
    ComponentRegistry.register(ComposerEditor, role: "Composer:Editor")

    @isSending = false
    spyOn(DraftStore, "isSendingDraft").andCallFake => @isSending
    spyOn(DraftEditingSession.prototype, 'changeSetCommit').andCallFake (draft) =>
      @draft = draft
    spyOn(ContactStore, "searchContacts").andCallFake (email) =>

      it "doesn't warn", -> noWarn.call(@, "Hey there <blockquote class='gmail_quote'>attach</blockquote>")

    it "doesn't show a warning if you've attached a file", ->
      sessionSetupComplete = false
      useDraft.call(@,
        subject: "Subject"
        to: [u1]
        body: "Check out attached file"
        files: [f1])
      .then( =>
        sessionSetupComplete = true
      )
      waitsFor(( => sessionSetupComplete), "The session's draft needs to be set", 500)
      runs( =>
        makeComposer.call(@)
        status = @composer._isValidDraft()
        expect(status).toBe true
        expect(@dialog.showMessageBox).not.toHaveBeenCalled()
      )

    it "bypasses the warning if force bit is set", ->
      sessionSetupComplete = false
      useDraft.call(@, to: [u1], subject: "").then( =>
        sessionSetupComplete = true
      )
      waitsFor(( => sessionSetupComplete), "The session's draft needs to be set", 500)
      runs( =>
        makeComposer.call(@)
        status = @composer._isValidDraft(force: true)
        expect(status).toBe true
        expect(@dialog.showMessageBox).not.toHaveBeenCalled()
      )

    it "sends when you click the send button", ->
      sessionSetupComplete = false
      useFullDraft.apply(@).then( =>
        sessionSetupComplete = true
      )
      waitsFor(( => sessionSetupComplete), "The session's draft needs to be set", 500)
      runs( =>
        makeComposer.call(@)
        sendBtn = @composer.refs.sendActionButton
        sendBtn.primarySend()
        expect(Actions.sendDraft).toHaveBeenCalledWith(DRAFT_CLIENT_ID, 'send')
        expect(Actions.sendDraft.calls.length).toBe 1
        # Delete the draft from _draftsSending so we can send it in other tests
        delete DraftStore._draftsSending[DRAFT_CLIENT_ID]
      )

    it "doesn't send twice if you double click", =>
      sessionSetupComplete = false
      useFullDraft.apply(@).then( =>
        sessionSetupComplete = true
      )
      waitsFor(( => sessionSetupComplete), "The session's draft needs to be set", 500)
      runs( =>
        makeComposer.call(@)
        sendBtn = @composer.refs.sendActionButton
        sendBtn.primarySend()
        sendBtn.primarySend()
        expect(Actions.sendDraft).toHaveBeenCalledWith(DRAFT_CLIENT_ID, 'send')
        expect(Actions.sendDraft.calls.length).toBe 1
        # Delete the draft from _draftsSending so we can send it in other tests
        delete DraftStore._draftsSending[DRAFT_CLIENT_ID]
      )

    describe "when sending a message with keyboard inputs", ->
      beforeEach ->
        sessionSetupComplete = false
        useFullDraft.apply(@).then =>
          makeComposer.call(@)
          @$composer = @composer.refs.composerWrap
          sessionSetupComplete = true
          waitsFor(( => sessionSetupComplete), "The session's draft needs to be set", 500)

      afterEach ->
        # Delete the draft from _draftsSending so we can send it in other tests
        delete DraftStore._draftsSending[DRAFT_CLIENT_ID]

      it "sends the draft on cmd-enter", ->
        ReactDOM.findDOMNode(@$composer).dispatchEvent(new CustomEvent('composer:send-message'))
