Remove commented-out code and add test.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user