1 describe('tr.models.Blip', function () {
3 beforeEach(function () {
4 blip
= new tr
.models
.Blip(
6 new tr
.models
.Cycle('My Cycle')
10 it('has a name', function () {
11 expect(blip
.name()).toEqual('My Blip');
14 it('has a cycle', function () {
15 expect(blip
.cycle().name()).toEqual('My Cycle');
18 it('has a default number', function () {
19 expect(blip
.number()).toEqual(-1);
22 it('sets the number', function () {
24 expect(blip
.number()).toEqual(1);
27 it('is new', function () {
28 blip
= new tr
.models
.Blip(
30 new tr
.models
.Cycle('My Cycle'),
34 expect(blip
.isNew()).toBe(true);
37 it('is not new', function () {
38 blip
= new tr
.models
.Blip(
40 new tr
.models
.Cycle('My Cycle'),
44 expect(blip
.isNew()).toBe(false);