Upgrade ember qunit, create new interface for testing components

This commit is contained in:
Robin Ward
2015-07-14 13:56:59 -04:00
parent 1397507d05
commit 7a58d64f37
7 changed files with 162 additions and 146 deletions

View File

@@ -103,7 +103,7 @@ const PostMenuComponent = Ember.Component.extend(StringBuffer, {
const replyCount = post.get('reply_count');
buffer.push("<button class='show-replies highlight-action' data-action='replies'>");
buffer.push(I18n.t("post.has_replies", { count: replyCount }));
buffer.push(I18n.t("post.has_replies", { count: replyCount || 0 }));
const icon = (this.get('post.replies.length') > 0) ? 'chevron-up' : 'chevron-down';
return buffer.push(iconHTML(icon) + "</button>");

View File

@@ -70,7 +70,7 @@ const Topic = RestModel.extend({
}.property('url'),
url: function() {
let slug = this.get('slug');
let slug = this.get('slug') || '';
if (slug.trim().length === 0) {
slug = "topic";
}