-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
So I wanted to make sure the validations were working in the defined resources. What do you think a good test would be for that?
it('validates data before creation', function () {
var invalidEvnt = angular.extend(testEvnt, {
startDate: false // must be a Date object and must be less than endDate.
});
// Have to return something here;
DS.expectCreate('evnt', invalidEvnt).respond(new Error('invalid'));
Evnt.create(invalidEvnt).then(function (result) {
fail('should have rejected');
}, function (err) {
//This will just return the error I created, thus the test is a little useless.
});
});
Metadata
Metadata
Assignees
Labels
No labels