Upgrade Ember to 1.1.2

This commit is contained in:
Robin Ward
2013-10-29 13:01:42 -04:00
parent c9c7dc2002
commit 5689e314c5
20 changed files with 1565 additions and 1828 deletions

View File

@@ -17,7 +17,7 @@ asyncTestDiscourse('find', function() {
});
asyncTestDiscourse('generateMasterKey', function() {
this.stub(Discourse, 'ajax').returns(Ember.RSVP.resolve([]));
this.stub(Discourse, 'ajax').returns(Ember.RSVP.resolve({api_key: {}}));
Discourse.ApiKey.generateMasterKey().then(function() {
start();
ok(Discourse.ajax.calledWith("/admin/api/key", {type: 'POST'}), "it POSTs to create a master key");

View File

@@ -14,7 +14,7 @@ test("without selectedPosts", function () {
});
test("with some selectedPosts", function() {
var testObj = buildTestObj({ selectedPosts: [Discourse.Post.create()] });
var testObj = buildTestObj({ selectedPosts: [Discourse.Post.create({id: 123})] });
equal(testObj.get('selectedPostsCount'), 1, "It returns the amount of posts");
});

View File

@@ -0,0 +1,5 @@
module("Discourse.EmailLog");
test("create", function() {
ok(Discourse.EmailLog.create(), "it can be created without arguments");
});

View File

@@ -0,0 +1,5 @@
module("Discourse.Invite");
test("create", function() {
ok(Discourse.Invite.create(), "it can be created without arguments");
});

View File

@@ -0,0 +1,5 @@
module("Discourse.Notification");
test("create", function() {
ok(Discourse.Notification.create(), "it can be created without arguments");
});

View File

@@ -11,6 +11,10 @@ var buildStream = function(id, stream) {
var participant = {username: 'eviltrout'};
test('create', function() {
ok(Discourse.PostStream.create(), 'it can be created with no parameters');
});
test('defaults', function() {
var postStream = buildStream(1234);
blank(postStream.get('posts'), "there are no posts in a stream by default");

View File

@@ -1,6 +1,10 @@
module("Discourse.Site");
test('instance', function(){
test('create', function() {
ok(Discourse.Site.create(), 'it can create with no parameters');
});
test('instance', function() {
var site = Discourse.Site.current();
@@ -32,5 +36,4 @@ test('create categories', function() {
present(subcategory, "it loaded the subcategory");
equal(subcategory.get('parentCategory'), parent, "it has associated the child with the parent");
});

View File

@@ -0,0 +1,5 @@
module("Discourse.StaffActionLog");
test("create", function() {
ok(Discourse.StaffActionLog.create(), "it can be created without arguments");
});