spec/integration/fieldset_spec.rb in yaks-0.9.0 vs spec/integration/fieldset_spec.rb in yaks-0.10.0

- old
+ new

@@ -20,11 +20,11 @@ Yaks::Resource::Form.new( name: :foo, fields: [ Yaks::Resource::Form::Fieldset.new( fields: [ - Yaks::Resource::Form::Field.new(name: "I am legend", type: :legend), + Yaks::Resource::Form::Legend.new(label: "I am legend", type: :legend), Yaks::Resource::Form::Field.new(name: :bar, type: :text) ] ) ] ) @@ -34,28 +34,26 @@ it 'should convert to halo' do expect( yaks.with(default_format: :halo, hooks: [[:skip, :serialize]]).call(:foo, mapper: mapper) ).to eql( - { - "_controls" => { - "foo" => { - "name" =>"foo", - "fields" => [ - { - "type" => "fieldset", - "fields" => [ - { - "name" => "I am legend", - "type" => "legend" - }, { - "name" => "bar", - "type" => "text" - } - ] - } - ] - } + "_controls" => { + "foo" => { + "name" => "foo", + "fields" => [ + { + "type" => "fieldset", + "fields" => [ + { + "label" => "I am legend", + "type" => "legend" + }, { + "name" => "bar", + "type" => "text" + } + ] + } + ] } } ) end end