index-test.js 724 B

123456789101112131415161718192021222324252627282930313233
  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. visit('/');
  15. andThen(function() {
  16. assert.equal(currentPath(), 'index');
  17. });
  18. });
  19. test('visiting / with custom title', function(assert) {
  20. var newTitle = "Misago Support Forums";
  21. window.MisagoData.misagoSettings['forum_index_title'] = newTitle;
  22. visit('/');
  23. andThen(function() {
  24. assert.equal(currentPath(), 'index');
  25. assert.equal(document.title, newTitle);
  26. });
  27. });