DC DG; jasmine green
This commit is contained in:
parent
f62b26fc73
commit
1d178116e9
4 changed files with 11 additions and 10 deletions
|
|
@ -1,17 +1,17 @@
|
|||
describe("Stream", function() {
|
||||
describe("App.Models.Stream", function() {
|
||||
describe("url", function() {
|
||||
var stream = new BackboneStream(),
|
||||
var stream = new App.Collections.Stream(),
|
||||
expectedPath = document.location.pathname + ".json";
|
||||
it("returns the json path", function() {
|
||||
expect(stream.url()).toEqual(expectedPath);
|
||||
});
|
||||
});
|
||||
|
||||
it("returns the json path with max_time if the collection has models", function() {
|
||||
var post = new Post();
|
||||
var post = new App.Models.Post();
|
||||
spyOn(post, "createdAt").andReturn(1234);
|
||||
|
||||
stream.add(post);
|
||||
|
||||
|
||||
expect(stream.url()).toEqual(expectedPath + "?max_time=1234");
|
||||
});
|
||||
});
|
||||
|
|
@ -35,11 +35,12 @@ src_files:
|
|||
- public/javascripts/pages/*
|
||||
- public/javascripts/helpers/*
|
||||
- public/javascripts/widgets/*
|
||||
|
||||
- public/javascripts/app.js
|
||||
- public/javascripts/models/*
|
||||
- public/javascripts/collections/*
|
||||
- public/javascripts/views/*
|
||||
|
||||
- public/javascripts/app/app.js
|
||||
- public/javascripts/app/router.js
|
||||
- public/javascripts/app/models/*
|
||||
- public/javascripts/app/collections/*
|
||||
- public/javascripts/app/views/*
|
||||
|
||||
- public/javascripts/mobile.js
|
||||
- public/javascripts/contact-list.js
|
||||
|
|
|
|||
Loading…
Reference in a new issue