Removed unused Week Model
This commit is contained in:
@@ -1 +0,0 @@
|
||||
describe "CMS.Models.Week", ->
|
||||
@@ -38,19 +38,15 @@ describe "CMS.Views.Week", ->
|
||||
|
||||
describe "edit", ->
|
||||
beforeEach ->
|
||||
@view = new CMS.Views.Week(el: $("#week"), height: 100).render()
|
||||
new CMS.Views.Week(el: $("#week"), height: 100).render()
|
||||
spyOn(CMS, "replaceView")
|
||||
spyOn(CMS.Views, "WeekEdit")
|
||||
.andReturn(@view = jasmine.createSpy("Views.WeekEdit"))
|
||||
spyOn(CMS.Models, "Week")
|
||||
.andReturn(@model = jasmine.createSpy("Models.Week"))
|
||||
$(".week-edit").click()
|
||||
|
||||
it "replace the content with edit week view", ->
|
||||
expect(CMS.replaceView).toHaveBeenCalledWith @view
|
||||
expect(CMS.Views.WeekEdit).toHaveBeenCalledWith model: @model
|
||||
expect(CMS.Models.Week).toHaveBeenCalledWith
|
||||
id: "i4x://mitx.edu/course/week"
|
||||
expect(CMS.Views.WeekEdit).toHaveBeenCalled()
|
||||
|
||||
describe "on content.show", ->
|
||||
beforeEach ->
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
class CMS.Models.Week extends Backbone.Model
|
||||
@@ -16,7 +16,7 @@ class CMS.Views.Week extends Backbone.View
|
||||
|
||||
edit: (event) =>
|
||||
event.preventDefault()
|
||||
CMS.replaceView(new CMS.Views.WeekEdit(model: new CMS.Models.Week(id: @$el.data('id'))))
|
||||
CMS.replaceView(new CMS.Views.WeekEdit())
|
||||
|
||||
setHeight: =>
|
||||
@$el.height(@options.height)
|
||||
|
||||
Reference in New Issue
Block a user