another fix
This commit is contained in:
parent
8aea97569e
commit
6b31491da7
|
@ -21,5 +21,5 @@ class window.<%= object_name %>View extends Backbone.View
|
||||||
@model.save(this.attributes())
|
@model.save(this.attributes())
|
||||||
destroy: =>
|
destroy: =>
|
||||||
if confirm("Are you sure?")
|
if confirm("Are you sure?")
|
||||||
@model.destroy
|
@model.destroy()
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,9 @@ describe '<%= object_name %>View', ->
|
||||||
setFixtures('<div id="container" />')
|
setFixtures('<div id="container" />')
|
||||||
|
|
||||||
view = new <%= object_name %>View({model: model})
|
view = new <%= object_name %>View({model: model})
|
||||||
|
|
||||||
it 'should render with an update button', ->
|
|
||||||
view.render()
|
view.render()
|
||||||
|
|
||||||
|
it 'should render with an update button', ->
|
||||||
expect(view.$('button.save')).toHaveText('Update')
|
expect(view.$('button.save')).toHaveText('Update')
|
||||||
|
|
||||||
it 'should destroy the model', ->
|
it 'should destroy the model', ->
|
||||||
|
|
Loading…
Reference in New Issue