Browse Source

Added assertions counts to tests

Rafał Pitoń 10 years ago
parent
commit
74d48ea8f8
33 changed files with 168 additions and 21 deletions
  1. 28 6
      misago/emberapp/tests/acceptance/forgotten-password-test.js
  2. 4 0
      misago/emberapp/tests/acceptance/index-test.js
  3. 4 0
      misago/emberapp/tests/acceptance/privacy-policy-test.js
  4. 4 0
      misago/emberapp/tests/acceptance/terms-of-service-test.js
  5. 10 0
      misago/emberapp/tests/unit/controllers/error-banned-test.js
  6. 6 0
      misago/emberapp/tests/unit/controllers/footer-test.js
  7. 2 0
      misago/emberapp/tests/unit/controllers/forgotten-password/change-form-test.js
  8. 2 0
      misago/emberapp/tests/unit/controllers/forgotten-password/link-sent-test.js
  9. 2 0
      misago/emberapp/tests/unit/controllers/forgotten-password/request-link-test.js
  10. 2 0
      misago/emberapp/tests/unit/controllers/guest-nav-test.js
  11. 4 0
      misago/emberapp/tests/unit/controllers/login-modal-test.js
  12. 14 0
      misago/emberapp/tests/unit/controllers/toast-message-test.js
  13. 2 0
      misago/emberapp/tests/unit/controllers/user-nav-test.js
  14. 2 0
      misago/emberapp/tests/unit/helpers/from-now-test.js
  15. 2 0
      misago/emberapp/tests/unit/initializers/auth-service-test.js
  16. 3 1
      misago/emberapp/tests/unit/initializers/dev-csrf-tokens-test.js
  17. 2 0
      misago/emberapp/tests/unit/initializers/django-location-test.js
  18. 2 0
      misago/emberapp/tests/unit/initializers/misago-settings-test.js
  19. 2 0
      misago/emberapp/tests/unit/initializers/moment-locale-test.js
  20. 2 0
      misago/emberapp/tests/unit/mixins/reset-scroll-test.js
  21. 2 0
      misago/emberapp/tests/unit/models/legal-page-test.js
  22. 6 0
      misago/emberapp/tests/unit/routes/application-test.js
  23. 3 4
      misago/emberapp/tests/unit/routes/forgotten-password/index-test.js
  24. 4 0
      misago/emberapp/tests/unit/routes/index-test.js
  25. 2 0
      misago/emberapp/tests/unit/routes/not-found-test.js
  26. 8 0
      misago/emberapp/tests/unit/routes/privacy-policy-test.js
  27. 8 0
      misago/emberapp/tests/unit/routes/terms-of-service-test.js
  28. 3 5
      misago/emberapp/tests/unit/services/auth-test.js
  29. 3 5
      misago/emberapp/tests/unit/services/clock-test.js
  30. 4 0
      misago/emberapp/tests/unit/utils/csrf-test.js
  31. 18 0
      misago/emberapp/tests/unit/utils/preloadstore-test.js
  32. 4 0
      misago/emberapp/tests/unit/utils/rpc-test.js
  33. 4 0
      misago/emberapp/tests/unit/utils/strings-test.js

+ 28 - 6
misago/emberapp/tests/acceptance/forgotten-password-test.js

@@ -20,6 +20,8 @@ module('Acceptance: ForgottenPassword', {
 });
 
 test('visiting /forgotten-password', function(assert) {
+  assert.expect(1);
+
   visit('/forgotten-password');
 
   andThen(function() {
@@ -28,6 +30,8 @@ test('visiting /forgotten-password', function(assert) {
 });
 
 test('request password change link without entering e-mail', function(assert) {
+  assert.expect(2);
+
   visit('/forgotten-password');
   click('.forgotten-password-page form .btn-primary');
 
@@ -38,6 +42,8 @@ test('request password change link without entering e-mail', function(assert) {
 });
 
 test('request password change link with invalid e-mail', function(assert) {
+  assert.expect(2);
+
   var message = 'Entered e-mail is invalid.';
   Ember.$.mockjax({
     url: '/api/change-password/send-link/',
@@ -59,6 +65,8 @@ test('request password change link with invalid e-mail', function(assert) {
 });
 
 test('request password change link with non-existing e-mail', function(assert) {
+  assert.expect(2);
+
   var message = 'No user with this e-mail exists.';
   Ember.$.mockjax({
     url: '/api/change-password/send-link/',
@@ -80,6 +88,8 @@ test('request password change link with non-existing e-mail', function(assert) {
 });
 
 test('request password change link with user-activated account', function(assert) {
+  assert.expect(2);
+
   var message = 'You have to activate your account before you will be able to sign in.';
   Ember.$.mockjax({
     url: '/api/change-password/send-link/',
@@ -101,6 +111,8 @@ test('request password change link with user-activated account', function(assert
 });
 
 test('request password change link with admin-activated account', function(assert) {
+  assert.expect(2);
+
   var message = 'Your account has to be activated by Administrator before you will be able to sign in.';
   Ember.$.mockjax({
     url: '/api/change-password/send-link/',
@@ -122,7 +134,8 @@ test('request password change link with admin-activated account', function(asser
 });
 
 test('request password change link with banned account', function(assert) {
-  var done = assert.async();
+  assert.expect(2);
+
   Ember.$.mockjax({
     url: '/api/change-password/send-link/',
     status: 400,
@@ -148,13 +161,12 @@ test('request password change link with banned account', function(assert) {
 
     var expirationMessage = find('.error-message>p').text();
     assert.equal(expirationMessage, 'This ban is permanent.');
-
-    done();
   });
 });
 
 test('request password change link', function(assert) {
-  var done = assert.async();
+  assert.expect(1);
+
   Ember.$.mockjax({
     url: '/api/change-password/send-link/',
     status: 200,
@@ -171,12 +183,12 @@ test('request password change link', function(assert) {
   andThen(function() {
     var pageHeader = Ember.$.trim(find('.page-header h1').text());
     assert.equal(pageHeader, 'Change password form link sent');
-
-    done();
   });
 });
 
 test('invalid token is handled', function(assert) {
+  assert.expect(2);
+
   var message = 'Token was rejected.';
   Ember.$.mockjax({
     url: '/api/change-password/1/token/validate-token/',
@@ -195,6 +207,8 @@ test('invalid token is handled', function(assert) {
 });
 
 test('permission denied is handled', function(assert) {
+  assert.expect(2);
+
   var message = 'Token was rejected.';
   Ember.$.mockjax({
     url: '/api/change-password/1/token/validate-token/',
@@ -215,6 +229,8 @@ test('permission denied is handled', function(assert) {
 });
 
 test('token is validated', function(assert) {
+  assert.expect(1);
+
   Ember.$.mockjax({
     url: '/api/change-password/1/token/validate-token/',
     status: 200,
@@ -233,6 +249,8 @@ test('token is validated', function(assert) {
 });
 
 test('no new password is entered', function(assert) {
+  assert.expect(2);
+
   Ember.$.mockjax({
     url: '/api/change-password/1/token/validate-token/',
     status: 200,
@@ -253,6 +271,8 @@ test('no new password is entered', function(assert) {
 });
 
 test('new password is invalid', function(assert) {
+  assert.expect(2);
+
   Ember.$.mockjax({
     url: '/api/change-password/1/token/validate-token/',
     status: 200,
@@ -283,6 +303,8 @@ test('new password is invalid', function(assert) {
 });
 
 test('new password is accepted', function(assert) {
+  assert.expect(3);
+
   Ember.$.mockjax({
     url: '/api/change-password/1/token/validate-token/',
     status: 200,

+ 4 - 0
misago/emberapp/tests/acceptance/index-test.js

@@ -14,6 +14,8 @@ module('Acceptance: Index', {
 });
 
 test('visiting /', function(assert) {
+  assert.expect(1);
+
   visit('/');
 
   andThen(function() {
@@ -22,6 +24,8 @@ test('visiting /', function(assert) {
 });
 
 test('visiting / with custom title', function(assert) {
+  assert.expect(2);
+
   var newTitle = "Misago Support Forums";
   window.MisagoData.misagoSettings['forum_index_title'] = newTitle;
   visit('/');

+ 4 - 0
misago/emberapp/tests/acceptance/privacy-policy-test.js

@@ -15,6 +15,8 @@ module('Acceptance: PrivacyPolicy', {
 });
 
 test('visiting unset /privacy-policy', function(assert) {
+  assert.expect(1);
+
   Ember.$.mockjax({
     url: "/api/legal-pages/privacy-policy/",
     status: 404,
@@ -29,6 +31,8 @@ test('visiting unset /privacy-policy', function(assert) {
 });
 
 test('visiting set /privacy-policy', function(assert) {
+  assert.expect(2);
+
   Ember.$.mockjax({
     url: "/api/legal-pages/privacy-policy/",
     status: 200,

+ 4 - 0
misago/emberapp/tests/acceptance/terms-of-service-test.js

@@ -15,6 +15,8 @@ module('Acceptance: TermsOfService', {
 });
 
 test('visiting unset /terms-of-service', function(assert) {
+  assert.expect(1);
+
   Ember.$.mockjax({
     url: "/api/legal-pages/terms-of-service/",
     status: 404,
@@ -29,6 +31,8 @@ test('visiting unset /terms-of-service', function(assert) {
 });
 
 test('visiting set /terms-of-service', function(assert) {
+  assert.expect(2);
+
   Ember.$.mockjax({
     url: "/api/legal-pages/terms-of-service/",
     status: 200,

+ 10 - 0
misago/emberapp/tests/unit/controllers/error-banned-test.js

@@ -6,11 +6,15 @@ import {
 moduleFor('controller:error-banned', 'ErrorBannedController');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var controller = this.subject();
   assert.ok(controller);
 });
 
 test('isPermanent works', function(assert) {
+  assert.expect(2);
+
   var controller = this.subject();
 
   controller.set('model', {'expires_on': null});
@@ -21,6 +25,8 @@ test('isPermanent works', function(assert) {
 });
 
 test('expiresMoment works', function(assert) {
+  assert.expect(2);
+
   var controller = this.subject();
 
   controller.set('model', {'expires_on': null});
@@ -31,6 +37,8 @@ test('expiresMoment works', function(assert) {
 });
 
 test('expiresOn works', function(assert) {
+  assert.expect(2);
+
   var controller = this.subject();
 
   controller.set('model', {'expires_on': null});
@@ -41,6 +49,8 @@ test('expiresOn works', function(assert) {
 });
 
 test('isExpired works', function(assert) {
+  assert.expect(3);
+
   var controller = this.subject();
 
   controller.set('model', {'expires_on': null});

+ 6 - 0
misago/emberapp/tests/unit/controllers/footer-test.js

@@ -11,6 +11,8 @@ test('it exists', function(assert) {
 });
 
 test('showTermsLink', function(assert) {
+  assert.expect(4);
+
   var controller = this.subject();
 
   // ToS isn't defined and there isn't link to remote ToS page, don't show link
@@ -31,6 +33,8 @@ test('showTermsLink', function(assert) {
 });
 
 test('showPrivacyLink', function(assert) {
+  assert.expect(4);
+
   var controller = this.subject();
 
   // PrivPolicy isn't defined and there isn't link to remote PrivPolicy page, don't show link
@@ -51,6 +55,8 @@ test('showPrivacyLink', function(assert) {
 });
 
 test('showNav', function(assert) {
+  assert.expect(4);
+
   var controller = this.subject();
 
   // no Privacy Policy or ToS, don't show footer nav

+ 2 - 0
misago/emberapp/tests/unit/controllers/forgotten-password/change-form-test.js

@@ -6,6 +6,8 @@ import {
 moduleFor('controller:forgotten-password/change-form', 'ChangeFormController');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var controller = this.subject();
   assert.ok(controller);
 });

+ 2 - 0
misago/emberapp/tests/unit/controllers/forgotten-password/link-sent-test.js

@@ -6,6 +6,8 @@ import {
 moduleFor('controller:forgotten-password/link-sent', 'LinkSentController');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var controller = this.subject();
   assert.ok(controller);
 });

+ 2 - 0
misago/emberapp/tests/unit/controllers/forgotten-password/request-link-test.js

@@ -6,6 +6,8 @@ import {
 moduleFor('controller:forgotten-password/request-link', 'RequestLinkController');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var controller = this.subject();
   assert.ok(controller);
 });

+ 2 - 0
misago/emberapp/tests/unit/controllers/guest-nav-test.js

@@ -6,6 +6,8 @@ import {
 moduleFor('controller:guest-nav', 'GuestNavController');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var controller = this.subject();
   assert.ok(controller);
 });

+ 4 - 0
misago/emberapp/tests/unit/controllers/login-modal-test.js

@@ -7,6 +7,8 @@ import {
 moduleFor('controller:login-modal', 'LoginModalController');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var self = this;
   Ember.run(function(){
     var controller = self.subject();
@@ -15,6 +17,8 @@ test('it exists', function(assert) {
 });
 
 test('reset works', function(assert) {
+  assert.expect(8);
+
   var self = this;
   Ember.run(function(){
     var controller = self.subject();

+ 14 - 0
misago/emberapp/tests/unit/controllers/toast-message-test.js

@@ -6,11 +6,15 @@ import {
 moduleFor('service:toast-message', 'ToastMessageService');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var service = this.subject();
   assert.ok(service);
 });
 
 test('isInfo', function(assert) {
+  assert.expect(4);
+
   var service = this.subject();
 
   service.set('type', 'info');
@@ -22,6 +26,8 @@ test('isInfo', function(assert) {
 });
 
 test('isSuccess', function(assert) {
+  assert.expect(4);
+
   var service = this.subject();
 
   service.set('type', 'success');
@@ -33,6 +39,8 @@ test('isSuccess', function(assert) {
 });
 
 test('isWarning', function(assert) {
+  assert.expect(4);
+
   var service = this.subject();
 
   service.set('type', 'warning');
@@ -44,6 +52,8 @@ test('isWarning', function(assert) {
 });
 
 test('isError', function(assert) {
+  assert.expect(4);
+
   var service = this.subject();
 
   service.set('type', 'error');
@@ -55,6 +65,8 @@ test('isError', function(assert) {
 });
 
 test('_setToast', function(assert) {
+  assert.expect(3);
+
   var service = this.subject();
 
   var testMessage = "I'm test toast!";
@@ -67,6 +79,8 @@ test('_setToast', function(assert) {
 });
 
 test('_showToast', function(assert) {
+  assert.expect(3);
+
   var service = this.subject();
 
   var testMessage = "I'm test toast!";

+ 2 - 0
misago/emberapp/tests/unit/controllers/user-nav-test.js

@@ -6,6 +6,8 @@ import {
 moduleFor('controller:user-nav', 'UserNavController');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var controller = this.subject();
   assert.ok(controller);
 });

+ 2 - 0
misago/emberapp/tests/unit/helpers/from-now-test.js

@@ -6,6 +6,8 @@ import { module, test } from 'qunit';
 module('FromNowHelper');
 
 test('helper returns valid from now', function(assert) {
+  assert.expect(2);
+
   var teststamp = moment();
   teststamp.add(7, 'days');
 

+ 2 - 0
misago/emberapp/tests/unit/initializers/auth-service-test.js

@@ -15,6 +15,8 @@ module('AuthServiceInitializer', {
 });
 
 test('initializer registered auth and user', function(assert) {
+  assert.expect(2);
+
   initialize(container, application);
 
   assert.ok(container.has('misago:auth'));

+ 3 - 1
misago/emberapp/tests/unit/initializers/dev-csrf-tokens-test.js

@@ -36,8 +36,10 @@ module('devCsrfTokensInitializer', {
   }
 });
 
-test('sets tokens on predefined forms', 1, function(assert) {
+test('sets tokens on predefined forms', function(assert) {
+  assert.expect(1);
   var done = assert.async();
+
   Ember.run(function() {
     initialize();
     assert.equal($element.val(), testCookieValue);

+ 2 - 0
misago/emberapp/tests/unit/initializers/django-location-test.js

@@ -15,6 +15,8 @@ module('DjangoLocationInitializer', {
 });
 
 test('initializer registers location api', function(assert) {
+  assert.expect(1);
+
   initialize(container, application);
 
   assert.ok(container.has('location:django-location'));

+ 2 - 0
misago/emberapp/tests/unit/initializers/misago-settings-test.js

@@ -16,6 +16,8 @@ module('SettingsInitializer', {
 });
 
 test('registers preloaded configuration in Ember', function(assert) {
+  assert.expect(3);
+
   initialize(container, application);
 
   assert.equal(container.lookup('misago:static-url'), MisagoPreloadStore.get('staticUrl'));

+ 2 - 0
misago/emberapp/tests/unit/initializers/moment-locale-test.js

@@ -23,6 +23,8 @@ module('MomentLocaleInitializer', {
 });
 
 test('initializer changes moment.js locale', function(assert) {
+  assert.expect(1);
+
   Ember.$('html').attr('lang', 'pl');
   initialize(container, application);
 

+ 2 - 0
misago/emberapp/tests/unit/mixins/reset-scroll-test.js

@@ -6,6 +6,8 @@ module('ResetScrollMixin');
 
 // Replace this with your real tests.
 test('it works', function(assert) {
+  assert.expect(1);
+
   var ResetScrollObject = Ember.Object.extend(ResetScrollMixin);
   var subject = ResetScrollObject.create();
   assert.ok(subject);

+ 2 - 0
misago/emberapp/tests/unit/models/legal-page-test.js

@@ -6,6 +6,8 @@ import {
 moduleForModel('legal-page', 'LegalPage');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var model = this.subject();
   assert.ok(!!model);
 });

+ 6 - 0
misago/emberapp/tests/unit/routes/application-test.js

@@ -12,11 +12,15 @@ moduleFor('route:application', 'ApplicationRoute', {
 });
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var route = this.subject();
   assert.ok(route);
 });
 
 test('error', function(assert) {
+  assert.expect(1);
+
   var route = this.subject();
   route.set('settings', {'forum_name': 'Test Forum'});
 
@@ -26,6 +30,8 @@ test('error', function(assert) {
 });
 
 test('setTitle', function(assert) {
+  assert.expect(5);
+
   var route = this.subject();
   route.set('settings', {'forum_name': 'Test Forum'});
 

+ 3 - 4
misago/emberapp/tests/unit/routes/forgotten-password/index-test.js

@@ -3,12 +3,11 @@ import {
   test
 } from 'ember-qunit';
 
-moduleFor('route:forgotten-password/index', {
-  // Specify the other units that are required for this test.
-  // needs: ['controller:foo']
-});
+moduleFor('route:forgotten-password/index');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var route = this.subject();
   assert.ok(route);
 });

+ 4 - 0
misago/emberapp/tests/unit/routes/index-test.js

@@ -12,11 +12,15 @@ moduleFor('route:index', 'IndexRoute', {
 });
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var route = this.subject();
   assert.ok(route);
 });
 
 test('sets title correctly', function(assert) {
+  assert.expect(2);
+
   var route = this.subject();
 
   route.set('settings', {

+ 2 - 0
misago/emberapp/tests/unit/routes/not-found-test.js

@@ -6,6 +6,8 @@ import {
 moduleFor('route:not-found', 'NotFoundRoute');
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var route = this.subject();
   assert.ok(route);
 });

+ 8 - 0
misago/emberapp/tests/unit/routes/privacy-policy-test.js

@@ -12,16 +12,22 @@ moduleFor('route:privacy-policy', 'PrivacyPolicyRoute', {
 });
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var route = this.subject();
   assert.ok(route);
 });
 
 test('setting', function(assert) {
+  assert.expect(1);
+
   var route = this.subject();
   assert.equal(route.get('setting'), 'privacy_policy');
 });
 
 test('title', function(assert) {
+  assert.expect(2);
+
   var route = this.subject();
 
   assert.equal(route.get('title'), route.get('defaultTitle'));
@@ -32,6 +38,8 @@ test('title', function(assert) {
 });
 
 test('link', function(assert) {
+  assert.expect(2);
+
   var route = this.subject();
 
   assert.ok(!route.get('link'));

+ 8 - 0
misago/emberapp/tests/unit/routes/terms-of-service-test.js

@@ -12,16 +12,22 @@ moduleFor('route:terms-of-service', 'TermsOfServiceRoute', {
 });
 
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var route = this.subject();
   assert.ok(route);
 });
 
 test('setting', function(assert) {
+  assert.expect(1);
+
   var route = this.subject();
   assert.equal(route.get('setting'), 'terms_of_service');
 });
 
 test('title', function(assert) {
+  assert.expect(2);
+
   var route = this.subject();
 
   assert.equal(route.get('title'), route.get('defaultTitle'));
@@ -32,6 +38,8 @@ test('title', function(assert) {
 });
 
 test('link', function(assert) {
+  assert.expect(2);
+
   var route = this.subject();
 
   assert.ok(!route.get('link'));

+ 3 - 5
misago/emberapp/tests/unit/services/auth-test.js

@@ -3,13 +3,11 @@ import {
   test
 } from 'ember-qunit';
 
-moduleFor('service:auth', {
-  // Specify the other units that are required for this test.
-  // needs: ['service:foo']
-});
+moduleFor('service:auth');
 
-// Replace this with your real tests.
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var service = this.subject();
   assert.ok(service);
 });

+ 3 - 5
misago/emberapp/tests/unit/services/clock-test.js

@@ -3,13 +3,11 @@ import {
   test
 } from 'ember-qunit';
 
-moduleFor('service:clock', {
-  // Specify the other units that are required for this test.
-  // needs: ['service:foo']
-});
+moduleFor('service:clock');
 
-// Replace this with your real tests.
 test('it exists', function(assert) {
+  assert.expect(1);
+
   var service = this.subject();
   assert.ok(service);
 });

+ 4 - 0
misago/emberapp/tests/unit/utils/csrf-test.js

@@ -11,6 +11,8 @@ module('csrf', {
 });
 
 test('getCsrfToken function returns csrf token', function(assert) {
+  assert.expect(1);
+
   var cookieName = 'validcsrfcookie';
   var token = 'v4l1dc5rft0k3n';
 
@@ -21,6 +23,8 @@ test('getCsrfToken function returns csrf token', function(assert) {
 });
 
 test('getCsrfToken function returns undefined for non-existing cookie', function(assert) {
+  assert.expect(1);
+
   MisagoPreloadStore.set('csrfCookieName', 'n0n3x15t1ng');
   assert.equal(getCsrfToken(), undefined);
 });

+ 18 - 0
misago/emberapp/tests/unit/utils/preloadstore-test.js

@@ -4,25 +4,35 @@ import { module, test } from 'qunit';
 module('PreloadStore');
 
 test('has(key) method returns true for existing keys', function(assert) {
+  assert.expect(3);
+
   assert.ok(PreloadStore.has('staticUrl'));
   assert.ok(PreloadStore.has('mediaUrl'));
   assert.ok(PreloadStore.has('misagoSettings'));
 });
 
 test('has(key) method returns false for undefined keys', function(assert) {
+  assert.expect(1);
+
   assert.equal(PreloadStore.has('notExisting'), false);
 });
 
 test('get(key) method returns value for defined key', function(assert) {
+  assert.expect(2);
+
   assert.equal(PreloadStore.get('misagoSettings'), window.MisagoData.misagoSettings);
   assert.equal(PreloadStore.get('mediaUrl'), window.MisagoData.mediaUrl);
 });
 
 test('get(key) method returns undefined for undefined key', function(assert) {
+  assert.expect(1);
+
   assert.equal(PreloadStore.get('undefinedKey'), undefined);
 });
 
 test('get(key, default) method returns default value for undefined key', function(assert) {
+  assert.expect(2);
+
   var key = 'undefinedKey';
   var defaultValue = 'Default value';
 
@@ -31,6 +41,8 @@ test('get(key, default) method returns default value for undefined key', functio
 });
 
 test('get(key, default) method returns value for defined key', function(assert) {
+  assert.expect(2);
+
   var key = 'mediaUrl';
 
   assert.equal(PreloadStore.get(key, 'Default Value'), window.MisagoData.mediaUrl);
@@ -38,6 +50,8 @@ test('get(key, default) method returns value for defined key', function(assert)
 });
 
 test('set(key, value) method sets new value', function(assert) {
+  assert.expect(3);
+
   var key = 'testKey';
   var value = 'Lo Bob!';
 
@@ -47,6 +61,8 @@ test('set(key, value) method sets new value', function(assert) {
 });
 
 test('pop(key, default) method returns default undefined for key', function(assert) {
+  assert.expect(2);
+
   var key = 'undefinedKey';
   var defaultValue = 'Default value';
 
@@ -55,6 +71,8 @@ test('pop(key, default) method returns default undefined for key', function(asse
 });
 
 test('pop(key, default) method returns and deletes value for key', function(assert) {
+  assert.expect(3);
+
   var key = 'undefinedKey';
   var realValue = 'valid value!';
   var defaultValue = 'Default value';

+ 4 - 0
misago/emberapp/tests/unit/utils/rpc-test.js

@@ -9,6 +9,8 @@ module('RPC', {
 });
 
 test('buildUrl builds valid urls', function(assert) {
+  assert.expect(3);
+
   assert.equal(buildUrl('some/procedure', {
     API_HOST: '',
     API_NAMESPACE: 'api/v2',
@@ -35,6 +37,7 @@ var conf = {
 };
 
 test('successfull rpc call passes', function(assert) {
+  assert.expect(1);
   var done = assert.async();
 
   Ember.$.mockjax({
@@ -55,6 +58,7 @@ test('successfull rpc call passes', function(assert) {
 });
 
 test('invalid rpc call fails', function(assert) {
+  assert.expect(1);
   var done = assert.async();
 
   Ember.$.mockjax({

+ 4 - 0
misago/emberapp/tests/unit/utils/strings-test.js

@@ -4,12 +4,16 @@ import { module, test } from 'qunit';
 module('strings');
 
 test('startsWith works', function(assert) {
+  assert.expect(3);
+
   assert.ok(startsWith("Boberson", "Bob"));
   assert.ok(!startsWith("Boberson", "bob"));
   assert.ok(!startsWith("Bob", "Boberson"));
 });
 
 test('endsWith works', function(assert) {
+  assert.expect(3);
+
   assert.ok(endsWith("Boberson", "son"));
   assert.ok(!endsWith("Boberson", "Son"));
   assert.ok(!endsWith("Bob", "Boberson"));