{Message} = require 'nylas-exports' SignatureComposerExtension = require '../lib/signature-composer-extension' describe "SignatureComposerExtension", -> describe "prepareNewDraft", -> describe "when a signature is defined", -> beforeEach -> @signature = '
Hello world' b = new Message draft: true body: 'This is a another test.' SignatureComposerExtension.prepareNewDraft(draft: a) expect(a.body).toEqual('This is a test!
Hello world') SignatureComposerExtension.prepareNewDraft(draft: b) expect(b.body).toEqual('This is a another test.
Hello world' SignatureComposerExtension.prepareNewDraft(draft: a) expect(a.body).toEqual('This is a test!
Hello world')