<commit_before>/* global expect */

/**
 * Mail
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author <NAME> <<EMAIL>>
 * @copyright <NAME> 2017
 */

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

	describe('AttachmentsView', function() {

		var view;

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

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

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

			expect(this.AttachmentView.el.innerHTML)
				.toContain('<ul></ul>\n\
<button type="button" id="add-local-attachment" style="display: inline-block;">\n\
  <span class="icon-upload"></span> Add attachment\n\
</button>\n\
<button type="button" id="add-cloud-attachment" style="display: inline-block;">\n\
  <span class="icon-edit"></span> Add from Files\n\
</button>\n\
<input type="file" multiple="" id="local-attachments" style="display: none;">\n');
		});
	});
});<commit_msg>Fix js tests<commit_after>/* global expect */

/**
 * Mail
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author <NAME> <<EMAIL>>
 * @copyright <NAME> 2017
 */

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

	describe('AttachmentsView', function() {

		var view;

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

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

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

			expect(view.el.innerHTML)
				.toContain('<ul></ul>\n\
<button type="button" id="add-local-attachment" style="display: inline-block;">\n\
  <span class="icon-upload"></span> Add attachment\n\
</button>\n\
<button type="button" id="add-cloud-attachment" style="display: inline-block;">\n\
  <span class="icon-edit"></span> Add from Files\n\
</button>\n\
<input type="file" multiple="" id="local-attachments" style="display: none;">\n');
		});
	});
});
{'fraction_non_alphanumeric': 0.20989304812834225, 'fraction_numerical': 0.004456327985739751, 'mean_word_length': 4.294811320754717, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '5917534', 'n_tokens_mistral': 796, 'n_tokens_neox': 726, 'n_words': 162}