Permalink
Browse files

Add Dashboard.Event model

  • Loading branch information...
pangratz committed Jul 24, 2012
1 parent da3cbde commit 78f26ce83d53fd9459c9f6968b1cbcc025b51d08
Showing with 16 additions and 0 deletions.
  1. +9 −0 app/lib/model.js
  2. +7 −0 app/tests/unit/model_test.js
View
@@ -12,4 +12,13 @@ Dashboard.Repository = DS.Model.extend({
owner: function() {
return this.get('data.owner')
}.property('data')
+});
+
+Dashboard.Event = DS.Model.extend({
+ type: DS.attr('string'),
+ created_at: DS.attr('string'),
+ actor: function() { return this.get('data.actor'); }.property('data.actor'),
+ repo: function() { return this.get('data.repo'); }.property('data.repo'),
+ org: function() { return this.get('data.org'); }.property('data.org'),
+ payload: function() { return this.get('data.payload'); }.property('data.payload')
});
@@ -6,3 +6,10 @@ test("it exists", function() {
ok(Dashboard.Repository, "it exists");
ok(DS.Model.detect(Dashboard.Repository), "it is a DS.Model");
});
+
+module("Dashboard.Event");
+
+test("it exists", function() {
+ ok(Dashboard.Event, "it exists");
+ ok(DS.Model.detect(Dashboard.Event), "it is a DS.Model");
+});

0 comments on commit 78f26ce

Please sign in to comment.