/**
 * Mail
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Christoph Wurst <christoph@winzerhof-wurst.at>
 * @copyright Christoph Wurst 2015
 */

define(['views/attachments', 'handlebars'], function(AttachmentView, Handlebars) {

	describe('AttachmentsView test', function() {

		beforeEach(function() {
			Handlebars.registerHelper('t', function() {
				return 'translation';
			});

			$('body').append('<div id="#mail-attachments-template"></div>');
			this.AttachmentView = new AttachmentView({});
		});

		afterEach(function() {
			this.AttachmentView.remove();
			$('#mail-attachments-template').remove();
		});

		describe('Rendering', function() {

			it('produces the correct HTML', function() {
				this.AttachmentView.render();

				expect(this.AttachmentView.el.innerHTML)
					.toContain('<ul></ul>\n<input type="button" id="mail_new_attachment" value="translation">');
			});

		});

	});
});


@@ -253,18 +253,20 @@
 ', '
-handlebars
+views/helper
 '%5D, 
@@ -292,20 +292,8 @@
 View
-, Handlebars
 ) %7B%0A
@@ -371,89 +371,8 @@
 ) %7B%0A
-%09%09%09Handlebars.registerHelper('t', function() %7B%0A%09%09%09%09return 'translation';%0A%09%09%09%7D);%0A%0A
 %09%09%09$
@@ -852,19 +852,33 @@
 ue=%22
-translation
+Add attachment from Files
 %22%3E')

Remove the Handlebars Helper for translaton and use the helper view