Remove commented-out code and add test.

This commit is contained in:
Peter Fogg
2013-07-22 11:34:18 -04:00
parent 925f0a5ee8
commit e3e6fd2002

View File

@@ -63,7 +63,6 @@ describe "Course Overview", ->
afterEach ->
delete window.analytics
delete window.course_location_analytics
# @xhr.restore()
@notificationSpy.reset()
it "should save model when save is clicked", ->
@@ -83,6 +82,12 @@ describe "Course Overview", ->
expect(deleteSpy).toHaveBeenCalled()
expect(@requests[0].url).toEqual('/delete_item')
it "should not delete model when cancel is clicked", ->
deleteSpy = spyOn(window, '_deleteItem').andCallThrough()
$('a.delete-section-button').click()
$('a.action-secondary').click()
expect(@requests.length).toEqual(0)
it "should show a confirmation on delete", ->
$('a.delete-section-button').click()
$('a.action-primary').click()