<commit_before>/**
 * Mail
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author <NAME> <<EMAIL>>
 * @copyright <NAME> 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">');
			});<commit_msg>Remove the Handlebars Helper for translaton and use the helper view<commit_after>/**
 * Mail
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author <NAME> <<EMAIL>>
 * @copyright <NAME> 2015
 */

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

	describe('AttachmentsView test', function() {

		beforeEach(function() {
			$('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="Add attachment from Files">');
			});
{'fraction_non_alphanumeric': 0.17451084082496035, 'fraction_numerical': 0.005288207297726071, 'mean_word_length': 4.630952380952381, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3378834', 'n_tokens_mistral': 631, 'n_tokens_neox': 556, 'n_words': 126}