summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/mail_view
diff options
context:
space:
mode:
authorBruno Wagner <bwagner@thoughtworks.com>2014-10-07 15:01:42 +0200
committerBruno Wagner <bwagner@thoughtworks.com>2014-10-07 15:01:54 +0200
commit6299531f4c8f7daa1b4afab45d0439f635b03982 (patch)
tree92b2876e732731e5219e50ef7719c72ec2cb478a /web-ui/test/spec/mail_view
parent88abefd3e62fb65a08dde62a7d7e4ce1fa22f563 (diff)
Fixed jshint errors
Diffstat (limited to 'web-ui/test/spec/mail_view')
-rw-r--r--web-ui/test/spec/mail_view/data/mail_builder.spec.js10
-rw-r--r--web-ui/test/spec/mail_view/ui/mail_view.spec.js12
-rw-r--r--web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js6
-rw-r--r--web-ui/test/spec/mail_view/ui/recipients/recipients_iterator.spec.js4
-rw-r--r--web-ui/test/spec/mail_view/ui/reply_box.spec.js2
-rw-r--r--web-ui/test/spec/mail_view/ui/send_button.spec.js6
6 files changed, 21 insertions, 19 deletions
diff --git a/web-ui/test/spec/mail_view/data/mail_builder.spec.js b/web-ui/test/spec/mail_view/data/mail_builder.spec.js
index bf17d598..7f69098f 100644
--- a/web-ui/test/spec/mail_view/data/mail_builder.spec.js
+++ b/web-ui/test/spec/mail_view/data/mail_builder.spec.js
@@ -1,6 +1,6 @@
define(['mail_view/data/mail_builder'], function (mailBuilder) {
+ 'use strict';
describe('mail builder', function () {
- 'use strict';
it('sets ident if passed to constructor', function() {
var mail = mailBuilder.newMail('12345').build();
@@ -15,15 +15,15 @@ define(['mail_view/data/mail_builder'], function (mailBuilder) {
});
it('sets the subject', function() {
- var mail = mailBuilder.newMail().subject("subject").build();
+ var mail = mailBuilder.newMail().subject('subject').build();
- expect(mail.header.subject).toBe("subject");
+ expect(mail.header.subject).toBe('subject');
});
it('sets the body', function() {
- var mail = mailBuilder.newMail().body("some body text").build();
+ var mail = mailBuilder.newMail().body('some body text').build();
- expect(mail.body).toBe("some body text");
+ expect(mail.body).toBe('some body text');
});
describe('to field', function() {
diff --git a/web-ui/test/spec/mail_view/ui/mail_view.spec.js b/web-ui/test/spec/mail_view/ui/mail_view.spec.js
index 48d7bda2..9fed8275 100644
--- a/web-ui/test/spec/mail_view/ui/mail_view.spec.js
+++ b/web-ui/test/spec/mail_view/ui/mail_view.spec.js
@@ -72,7 +72,7 @@ describeComponent('mail_view/ui/mail_view', function () {
this.component.displayMail({}, testData);
this.component.select('newTagButton').click();
- var e = creatingEvent("keydown", 27);
+ var e = creatingEvent('keydown', 27);
var newTagInputComponent = this.component.select('newTagInput');
var addNewComponent = this.component.select('addNew');
@@ -114,13 +114,13 @@ describeComponent('mail_view/ui/mail_view', function () {
it('assumes that mail is not trusted if its signature contains no_trust from the user', function() {
var email = testData;
- email.security_casing = {imprints: [{seal: {trust: "no_trust", validity: "ultimate"}}]};
+ email.security_casing = {imprints: [{seal: {trust: 'no_trust', validity: 'ultimate'}}]};
expect(this.component.checkSigned(email)).toEqual('signed signature-not-trusted');
});
it('uses validity when trust is not present', function() {
var email = testData;
- email.security_casing = {imprints: [{seal: { validity: "no_trust"}}]};
+ email.security_casing = {imprints: [{seal: { validity: 'no_trust'}}]};
expect(this.component.checkSigned(email)).toEqual('signed signature-not-trusted');
});
@@ -131,8 +131,8 @@ describeComponent('mail_view/ui/mail_view', function () {
});
it('assumes that the mail is not signed if there are no imprints', function() {
- var email = testData
- email.security_casing = {imprints: []}
+ var email = testData;
+ email.security_casing = {imprints: []};
expect(this.component.checkSigned(email)).toEqual('not-signed');
});
@@ -163,7 +163,7 @@ describeComponent('mail_view/ui/mail_view', function () {
it('creates new tag when pressing Enter key on new tag input', function(){
var tagsUpdateEvent = spyOnEvent(document, Pixelated.events.mail.tags.update);
var tagListRefreshEvent = spyOnEvent(document, Pixelated.events.dispatchers.tags.refreshTagList);
- var e = creatingEvent("keydown", 13);
+ var e = creatingEvent('keydown', 13);
this.component.displayMail({}, testData);
this.component.select('newTagButton').click();
diff --git a/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js b/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js
index f54781a7..56bb1120 100644
--- a/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js
+++ b/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js
@@ -1,5 +1,3 @@
-/* global Pixelated */
-
describeComponent('mail_view/ui/recipients/recipients_input',function () {
'use strict';
@@ -40,12 +38,12 @@ describeComponent('mail_view/ui/recipients/recipients_input',function () {
var enterAddressKeyPressEvent = $.Event('keydown', { which: keycode[0] });
spyOn(enterAddressKeyPressEvent, 'preventDefault');
- this.$node.val('')
+ this.$node.val('');
this.$node.trigger(enterAddressKeyPressEvent);
expect(enterAddressKeyPressEvent.preventDefault).toHaveBeenCalled();
enterAddressKeyPressEvent.preventDefault.reset();
- this.$node.val('anything')
+ this.$node.val('anything');
this.$node.trigger(enterAddressKeyPressEvent);
expect(enterAddressKeyPressEvent.preventDefault).toHaveBeenCalled();
});
diff --git a/web-ui/test/spec/mail_view/ui/recipients/recipients_iterator.spec.js b/web-ui/test/spec/mail_view/ui/recipients/recipients_iterator.spec.js
index 095689c2..74e5c614 100644
--- a/web-ui/test/spec/mail_view/ui/recipients/recipients_iterator.spec.js
+++ b/web-ui/test/spec/mail_view/ui/recipients/recipients_iterator.spec.js
@@ -11,7 +11,7 @@ define(['mail_view/ui/recipients/recipients_iterator'], function (RecipientsIter
exitInput;
function createIterator(elements) {
- return recipientsIterator = new RecipientsIterator({ elements: elements, exitInput: exitInput });
+ return new RecipientsIterator({ elements: elements, exitInput: exitInput });
}
function resetMock(m) {
@@ -98,4 +98,4 @@ define(['mail_view/ui/recipients/recipients_iterator'], function (RecipientsIter
});
-}); \ No newline at end of file
+});
diff --git a/web-ui/test/spec/mail_view/ui/reply_box.spec.js b/web-ui/test/spec/mail_view/ui/reply_box.spec.js
index 0f1550c5..fa229506 100644
--- a/web-ui/test/spec/mail_view/ui/reply_box.spec.js
+++ b/web-ui/test/spec/mail_view/ui/reply_box.spec.js
@@ -37,7 +37,7 @@ describeComponent('mail_view/ui/reply_box', function () {
setupComponent(attrs);
- expect(this.component.attr.recipientValues['to']).toEqual([attrs.mail.header.from]);
+ expect(this.component.attr.recipientValues.to).toEqual([attrs.mail.header.from]);
});
it('should have a subject of Re: <original_message>', function() {
diff --git a/web-ui/test/spec/mail_view/ui/send_button.spec.js b/web-ui/test/spec/mail_view/ui/send_button.spec.js
index 579ce4a3..06f3b003 100644
--- a/web-ui/test/spec/mail_view/ui/send_button.spec.js
+++ b/web-ui/test/spec/mail_view/ui/send_button.spec.js
@@ -1,5 +1,9 @@
+/* global Pixelated */
+
describeComponent('mail_view/ui/send_button', function () {
+ 'use strict';
+
describe('send button', function () {
beforeEach(function () {
setupComponent('<button />');
@@ -81,7 +85,7 @@ describeComponent('mail_view/ui/send_button', function () {
var sendMailEvent = spyOnEvent(document, Pixelated.events.ui.mail.send);
spyOn(this.component, 'off');
- _.times(3, function () { $(document).trigger(Pixelated.events.ui.mail.recipientsUpdated) });;
+ _.times(3, function () { $(document).trigger(Pixelated.events.ui.mail.recipientsUpdated); });
expect(sendMailEvent).toHaveBeenTriggeredOn(document);
expect(this.component.off).toHaveBeenCalledWith(document, Pixelated.events.ui.mail.recipientsUpdated);