Sha256: bb261d91c4158bf857b9cc6aa064ec1a4517d3eac3161bff32967478704ecd4f

Contents?: true

Size: 787 Bytes

Versions: 2

Compression:

Stored size: 787 Bytes

Contents

(function() {
  "use strict";

  module('User visits the admin page.');

  test('lists the existing posts in the side bar', function() {
    visit('/');
    andThen(function() {
      equal(find('.posts-list .post').length, 2, 'The index page should have 2 posts.');
      equal(find('.posts-list .post:first .date').text().trim(), 'January 12, 2014', 'The date should be displayed for each post');
      equal(find('.posts-list .post:first .summary').text().trim(), 'Hello world.', 'The summary should be displayed for each post');
    });
  });

  test('shows the first post in the content area', function() {
    visit('/');
    andThen(function() {
      equal(find('article.post h1').text().trim(), 'Ember Is Fun!', 'The first post title should be displayed');
    });
  });

})();

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blogelator-0.2.5 spec/javascripts/blogelator/features/user_visits_admin_page_spec.js
blogelator-0.2.4 spec/javascripts/blogelator/features/user_visits_admin_page_spec.js