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(){
|
describe("app.views.Feedback", function(){
|
||||||
beforeEach(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 : {
|
Diaspora.I18n.load({stream : {
|
||||||
'like' : "Like",
|
'like' : "Like",
|
||||||
|
|
@ -55,19 +56,18 @@ describe("app.views.Feedback", function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
it("the like action should be 'Like'", 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(){
|
it("allows for unliking a just-liked post", function(){
|
||||||
// callback stuff.... we should fix this
|
var responseText = JSON.stringify({"author": this.userAttrs});
|
||||||
|
var ajax_success = { status: 201, responseText: responseText };
|
||||||
// expect(this.link().text()).toContain(Diaspora.I18n.t('stream.like'))
|
expect(this.link().text()).toContain(Diaspora.I18n.t("stream.like"));
|
||||||
|
this.link().click();
|
||||||
// this.link().click();
|
jasmine.Ajax.requests.mostRecent().respondWith(ajax_success);
|
||||||
// expect(this.link().text()).toContain(Diaspora.I18n.t('stream.unlike'))
|
expect(this.link().text()).toContain(Diaspora.I18n.t("stream.unlike"));
|
||||||
|
this.link().click();
|
||||||
// this.link().click();
|
expect(this.link().text()).toContain(Diaspora.I18n.t("stream.like"));
|
||||||
// expect(this.link().text()).toContain(Diaspora.I18n.t('stream.like'))
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -16,24 +16,24 @@ describe("app.views.Photos", function() {
|
||||||
}, this);
|
}, this);
|
||||||
});
|
});
|
||||||
|
|
||||||
// describe("initialize", function() {
|
describe("initialize", function() {
|
||||||
// it("binds an infinite scroll listener", function() {
|
it("binds an infinite scroll listener", function() {
|
||||||
// spyOn($.fn, "scroll");
|
spyOn($.fn, "scroll");
|
||||||
// new app.views.Stream({model : this.stream});
|
new app.views.Stream({model : this.stream});
|
||||||
// expect($.fn.scroll).toHaveBeenCalled();
|
expect($.fn.scroll).toHaveBeenCalled();
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
//
|
|
||||||
// describe("#render", function() {
|
describe("#render", function() {
|
||||||
// beforeEach(function() {
|
beforeEach(function() {
|
||||||
// this.photo = this.stream.items.models[0];
|
this.photo = this.stream.items.models[0];
|
||||||
// this.photoElement = $(this.view.$("#" + this.photo.get("guid")));
|
this.photoElement = $(this.view.$("#" + this.photo.get("guid")));
|
||||||
// });
|
});
|
||||||
//
|
|
||||||
// context("when rendering a photo message", function() {
|
context("when rendering a photo message", function() {
|
||||||
// it("shows the photo in the content area", function() {
|
it("shows the photo in the content area", function() {
|
||||||
// expect(this.photoElement.length).toBeGreaterThan(0); //markdown'ed
|
expect(this.photoElement.length).toBeGreaterThan(0);
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue