Skip to content

Commit

Permalink
Added createdBy to event schema
Browse files Browse the repository at this point in the history
  • Loading branch information
steves committed Aug 27, 2011
1 parent dfabd35 commit 360263c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/schema.js
Expand Up @@ -11,6 +11,7 @@ var Talk = new Schema({
var Event = new Schema({
hash : { type: String, index: true }
, name : String
, createdBy : String
, startsAt : Date
, endsAt : Date
, imageUrl : String
Expand Down
2 changes: 2 additions & 0 deletions specs/SchemaSpec.js
Expand Up @@ -9,6 +9,7 @@ describe('event', function(){
var EventModel = mongoose.model('Event');
var event = new EventModel();
event.name = 'test event';
event.createdBy = 'jmikola';
event.startsAt = startDate;
event.endsAt = endDate;
event.imageUrl = 'http://www.example.com/test.png';
Expand All @@ -17,6 +18,7 @@ describe('event', function(){
event.talks.push({name: 'test talk', hash: '#testtalk'});

expect(event.name).toEqual('test event');
expect(event.createdBy).toEqual('jmikola');
expect(event.startsAt).toEqual(startDate);
expect(event.endsAt).toEqual(endDate);
expect(event.imageUrl).toEqual('http://www.example.com/test.png');
Expand Down

0 comments on commit 360263c

Please sign in to comment.