Commit 9d2b1e94 authored by danielgrippi's avatar danielgrippi

actually clear photos from the publisher. also, i hate the photo uploader we're using.

parent 91e3f5f6
......@@ -48,6 +48,7 @@ app.views.Publisher = Backbone.View.extend({
// remove photos
this.$("#photodropzone").find('li').remove();
this.$("input[name='photos[]']").remove();
// close publishing area (CSS)
this.close();
......
......@@ -56,5 +56,14 @@ describe("app.views.Publisher", function() {
this.view.clear($.Event());
expect(this.view.$("#photodropzone").html()).toBe("");
})
it("removes all photo values appended by the photo uploader", function(){
$(this.view.el).prepend("<input name='photos[]' value='3'/>")
var photoValuesInput = this.view.$("input[name='photos[]']");
photoValuesInput.val("3")
this.view.clear($.Event());
expect(this.view.$("input[name='photos[]']").length).toBe(0);
})
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment