Skip to content

Commit

Permalink
Merge pull request #226 from dchacke/specs
Browse files Browse the repository at this point in the history
Add specs for throwing error if parent id not set on child when trying t...
  • Loading branch information
Dennis Charles Hackethal committed Apr 25, 2015
2 parents a712988 + fe576c5 commit 1e37035
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ More information [here](http://www.thenerdary.net/post/24889968081/debugging-web
## Development Priorities
The following features are to be implemented next:

- Throw error if parent id not set on child when trying to fetch parent
- Support multiple `hasMany` and `belongsTo` associations in front end
- Put up example application (the todo list?)
- Make prefix of create path `create_message` instead of `create_messages`
Expand Down
10 changes: 10 additions & 0 deletions spec/dummy/public/test/services/entangled_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,16 @@ describe('Entangled', function() {
});
});
});

it('receives an error when the parent id is not set', function(done) {
var item = Item.new();

item.list(function(err, list) {
expect(err.message).toBe("Couldn't find List with 'id'=undefined");
expect(list).not.toBeDefined();
done();
});
});
});
});
});

0 comments on commit 1e37035

Please sign in to comment.