describe('Order', function () {
var Order;
beforeEach(function () {
module('myApp');
inject(function (_Order_) {
Order = _Order_;
});
});
describe('default', function () {
it('total returns 0', function () {
expect(new Order().total).toBe(0);
});
it('description returns empty', function () {
expect(new Order().description).toBe('');
});
});
describe('with data', function () {
it('description returns data description', function () {
expect(new Order({description:'desc'}).description).toBe('desc');
});
it('total returns data total', function () {
expect(new Order({total:24}).total).toBe(24);
});
});
});