index-test.js 766 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import Ember from 'ember';
  2. import { module, test } from 'qunit';
  3. import startApp from '../helpers/start-app';
  4. var application;
  5. module('Acceptance: Index', {
  6. beforeEach: function() {
  7. application = startApp();
  8. },
  9. afterEach: function() {
  10. Ember.run(application, 'destroy');
  11. }
  12. });
  13. test('visiting /', function(assert) {
  14. assert.expect(1);
  15. visit('/');
  16. andThen(function() {
  17. assert.equal(currentPath(), 'index');
  18. });
  19. });
  20. test('visiting / with custom title', function(assert) {
  21. assert.expect(2);
  22. var newTitle = "Misago Support Forums";
  23. window.MisagoData.misagoSettings['forum_index_title'] = newTitle;
  24. visit('/');
  25. andThen(function() {
  26. assert.equal(currentPath(), 'index');
  27. assert.equal(document.title, newTitle);
  28. });
  29. });