Merge pull request #5793 from svbergerem/uncomment-jasmine-tests
Uncomment jasmine tests
This commit is contained in:
commit
efa2f43f72
2 changed files with 31 additions and 31 deletions
|
|
@ -1,6 +1,7 @@
|
|||
describe("app.views.Feedback", function(){
|
||||
beforeEach(function(){
|
||||
loginAs({id : -1, name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}});
|
||||
this.userAttrs = _.extend(factory.userAttrs(), {guid : -1});
|
||||
loginAs(this.userAttrs);
|
||||
|
||||
Diaspora.I18n.load({stream : {
|
||||
'like' : "Like",
|
||||
|
|
@ -55,19 +56,18 @@ describe("app.views.Feedback", function(){
|
|||
});
|
||||
|
||||
it("the like action should be 'Like'", function(){
|
||||
expect(this.link().text()).toContain(Diaspora.I18n.t('stream.like'));
|
||||
expect(this.link().text()).toContain(Diaspora.I18n.t("stream.like"));
|
||||
});
|
||||
|
||||
it("allows for unliking a just-liked post", function(){
|
||||
// callback stuff.... we should fix this
|
||||
|
||||
// expect(this.link().text()).toContain(Diaspora.I18n.t('stream.like'))
|
||||
|
||||
// this.link().click();
|
||||
// expect(this.link().text()).toContain(Diaspora.I18n.t('stream.unlike'))
|
||||
|
||||
// this.link().click();
|
||||
// expect(this.link().text()).toContain(Diaspora.I18n.t('stream.like'))
|
||||
var responseText = JSON.stringify({"author": this.userAttrs});
|
||||
var ajax_success = { status: 201, responseText: responseText };
|
||||
expect(this.link().text()).toContain(Diaspora.I18n.t("stream.like"));
|
||||
this.link().click();
|
||||
jasmine.Ajax.requests.mostRecent().respondWith(ajax_success);
|
||||
expect(this.link().text()).toContain(Diaspora.I18n.t("stream.unlike"));
|
||||
this.link().click();
|
||||
expect(this.link().text()).toContain(Diaspora.I18n.t("stream.like"));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -16,24 +16,24 @@ describe("app.views.Photos", function() {
|
|||
}, this);
|
||||
});
|
||||
|
||||
// describe("initialize", function() {
|
||||
// it("binds an infinite scroll listener", function() {
|
||||
// spyOn($.fn, "scroll");
|
||||
// new app.views.Stream({model : this.stream});
|
||||
// expect($.fn.scroll).toHaveBeenCalled();
|
||||
// });
|
||||
// });
|
||||
//
|
||||
// describe("#render", function() {
|
||||
// beforeEach(function() {
|
||||
// this.photo = this.stream.items.models[0];
|
||||
// this.photoElement = $(this.view.$("#" + this.photo.get("guid")));
|
||||
// });
|
||||
//
|
||||
// context("when rendering a photo message", function() {
|
||||
// it("shows the photo in the content area", function() {
|
||||
// expect(this.photoElement.length).toBeGreaterThan(0); //markdown'ed
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
describe("initialize", function() {
|
||||
it("binds an infinite scroll listener", function() {
|
||||
spyOn($.fn, "scroll");
|
||||
new app.views.Stream({model : this.stream});
|
||||
expect($.fn.scroll).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe("#render", function() {
|
||||
beforeEach(function() {
|
||||
this.photo = this.stream.items.models[0];
|
||||
this.photoElement = $(this.view.$("#" + this.photo.get("guid")));
|
||||
});
|
||||
|
||||
context("when rendering a photo message", function() {
|
||||
it("shows the photo in the content area", function() {
|
||||
expect(this.photoElement.length).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue