Sha256: 758600258eb2949ff223d07144ec7779517902491517fc30dfaeb8a67f33d902

Contents?: true

Size: 1.27 KB

Versions: 13

Compression:

Stored size: 1.27 KB

Contents

# describe "Lanes.Views.FormBindings", ->

#     it "updates inputs", ->
#         model = new Lanes.Test.DummyModel({name: 'start'})
#         view  = Lanes.Test.makeView({
#             template: '<div><h1>foo</h1><input type="text" name="name"></div>'
#         }, { formBindings: true, model: model })
#         view.render()
#         input = view.$('input')
#         expect(input.val()).toEqual('start')
#         input.val('test')
#         input.trigger('change')
#         expect(model.name).toEqual('test')

#     it "updates radio fields", ->
#         model = new Lanes.Test.DummyModel({name: 'start'})
#         view  = Lanes.Test.makeView({
#             template: """
#                 <div>
#                     <input id="a" type="radio" name="name" value="one">One
#                     <input id="b" type="radio" name="name" value="two">Two
#                     <input id="c" type="radio" name="name" value="three">Three
#                 </div>
#                 """
#         }, { formBindings: true, model: model })
#         view.render()
#             .$("#b")
#             .attr('checked', true)
#             .trigger('change')
#         expect(model.name).toEqual('two')
#         model.name="three"
#         expect(view.$("input:checked").attr("id")).toEqual('c')

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
lanes-0.8.3 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.8.2 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.8.1 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.8.0 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.7.0 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.6.1 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.6.0 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.5.6 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.5.5 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.5.0 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.4.0 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.3.0 spec/lanes/views/FormBindingsSpec.coffee
lanes-0.1.9.5 spec/lanes/views/FormBindingsSpec.coffee