From 123655ad377de1f79c79a1b00b3ecaad398ea9ea Mon Sep 17 00:00:00 2001 From: jelhan Date: Wed, 20 Jan 2016 03:52:06 +0100 Subject: [PATCH] some more code style errors --- tests/acceptance/view-evaluation-test.js | 68 ++++++++++++------------ tests/acceptance/view-poll-test.js | 30 +++++------ 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/tests/acceptance/view-evaluation-test.js b/tests/acceptance/view-evaluation-test.js index 234458f..e7f78af 100644 --- a/tests/acceptance/view-evaluation-test.js +++ b/tests/acceptance/view-evaluation-test.js @@ -10,13 +10,13 @@ import formattedDateHelper from 'croodle/helpers/formatted-date'; let application, server; module('Acceptance | view evaluation', { - beforeEach: function() { + beforeEach() { application = startApp(); application.__container__.lookup('adapter:application').__proto__.namespace = ''; server = new Pretender(); }, - afterEach: function() { + afterEach() { server.shutdown(); Ember.run(application, 'destroy'); @@ -24,8 +24,8 @@ module('Acceptance | view evaluation', { }); test('evaluation summary is not present for poll without participants', function(assert) { - let id = 'test', - encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789'; + let id = 'test'; + let encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789'; server.get(`/polls/${id}`, function() { return serverGetPolls( @@ -49,8 +49,8 @@ test('evaluation summary is not present for poll without participants', function }); test('evaluation is correct', function(assert) { - var id = 'test', - encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789'; + let id = 'test'; + let encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789'; server.get(`/polls/${id}`, function() { return serverGetPolls( @@ -58,21 +58,21 @@ test('evaluation is correct', function(assert) { id, answers: [ { - type: "yes", - labelTranslation: "answerTypes.yes.label", - icon: "glyphicon glyphicon-thumbs-up", - label: "Yes" + type: 'yes', + labelTranslation: 'answerTypes.yes.label', + icon: 'glyphicon glyphicon-thumbs-up', + label: 'Yes' }, { - type: "no", - labelTranslation: "answerTypes.no.label", - icon: "glyphicon glyphicon-thumbs-down", - label: "No" + type: 'no', + labelTranslation: 'answerTypes.no.label', + icon: 'glyphicon glyphicon-thumbs-down', + label: 'No' } ], options: [ - {title: '2015-12-12'}, - {title: '2016-01-01'} + { title: '2015-12-12' }, + { title: '2016-01-01' } ], users: [ { @@ -80,38 +80,38 @@ test('evaluation is correct', function(assert) { name: 'Maximilian', selections: [ { - type: "yes", - labelTranslation: "answerTypes.yes.label", - icon: "glyphicon glyphicon-thumbs-up", - label: "Yes" + type: 'yes', + labelTranslation: 'answerTypes.yes.label', + icon: 'glyphicon glyphicon-thumbs-up', + label: 'Yes' }, { - type: "yes", - labelTranslation: "answerTypes.yes.label", - icon: "glyphicon glyphicon-thumbs-up", - label: "Yes" + type: 'yes', + labelTranslation: 'answerTypes.yes.label', + icon: 'glyphicon glyphicon-thumbs-up', + label: 'Yes' } ], - creationDate: "2015-01-01T00:00:00.000Z" + creationDate: '2015-01-01T00:00:00.000Z' }, { id: `${id}_1`, name: 'Peter', selections: [ { - type: "yes", - labelTranslation: "answerTypes.yes.label", - icon: "glyphicon glyphicon-thumbs-up", - label: "Yes" + type: 'yes', + labelTranslation: 'answerTypes.yes.label', + icon: 'glyphicon glyphicon-thumbs-up', + label: 'Yes' }, { - id: "no", - labelTranslation: "answerTypes.yes.label", - icon: "glyphicon glyphicon-thumbs-up", - label: "Yes" + id: 'no', + labelTranslation: 'answerTypes.yes.label', + icon: 'glyphicon glyphicon-thumbs-up', + label: 'Yes' } ], - creationDate: "2015-08-01T00:00:00.000Z" + creationDate: '2015-08-01T00:00:00.000Z' } ] }, encryptionKey diff --git a/tests/acceptance/view-poll-test.js b/tests/acceptance/view-poll-test.js index 2c291bb..492c3ea 100644 --- a/tests/acceptance/view-poll-test.js +++ b/tests/acceptance/view-poll-test.js @@ -9,13 +9,13 @@ import serverGetPolls from '../helpers/server-get-polls'; let application, server; module('Acceptance | view poll', { - beforeEach: function() { + beforeEach() { application = startApp(); application.__container__.lookup('adapter:application').__proto__.namespace = ''; server = new Pretender(); }, - afterEach: function() { + afterEach() { server.shutdown(); Ember.run(application, 'destroy'); @@ -23,8 +23,8 @@ module('Acceptance | view poll', { }); test('view poll url', function(assert) { - var id = 'test', - encryptionKey = 'abcdefghijklmnopqrstuvwxyz012345789'; + let id = 'test'; + let encryptionKey = 'abcdefghijklmnopqrstuvwxyz012345789'; server.get(`/polls/${id}`, function() { return serverGetPolls({ id }, encryptionKey); @@ -41,16 +41,16 @@ test('view poll url', function(assert) { }); test('view a poll with dates', function(assert) { - var id = 'test', - encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789'; + let id = 'test'; + let encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789'; server.get(`/polls/${id}`, function() { return serverGetPolls( { id, options: [ - {title: '2015-12-12'}, - {title: '2016-01-01'} + { title: '2015-12-12' }, + { title: '2016-01-01' } ] }, encryptionKey ); @@ -85,9 +85,9 @@ test('view a poll with dates and times', function(assert) { id, isDateTime: true, options: [ - {title: '2015-12-12T11:11:00.000Z'}, - {title: '2015-12-12T13:13:00.000Z'}, - {title: '2016-01-01T11:11:00.000Z'} + { title: '2015-12-12T11:11:00.000Z' }, + { title: '2015-12-12T13:13:00.000Z' }, + { title: '2016-01-01T11:11:00.000Z' } ], timezone: timezone }, encryptionKey @@ -125,8 +125,8 @@ test('view a poll while timezone differs from the one poll got created in and ch id, isDateTime: true, options: [ - {title: '2015-12-12T11:11:00.000Z'}, - {title: '2016-01-01T11:11:00.000Z'} + { title: '2015-12-12T11:11:00.000Z' }, + { title: '2016-01-01T11:11:00.000Z' } ], timezone: timezonePoll }, encryptionKey @@ -186,8 +186,8 @@ test('view a poll while timezone differs from the one poll got created in and ch id, isDateTime: true, options: [ - {title: '2015-12-12T11:11:00.000Z'}, - {title: '2016-01-01T11:11:00.000Z'} + { title: '2015-12-12T11:11:00.000Z' }, + { title: '2016-01-01T11:11:00.000Z' } ], timezone: timezonePoll }, encryptionKey