test/unit/widget_test.rb in apotomo-1.0.0.beta1 vs test/unit/widget_test.rb in apotomo-1.0.0.beta2
- old
+ new
@@ -126,7 +126,17 @@
end
should "alias #widget_id to #name" do
assert_equal @mum.name, @mum.widget_id
end
+
+ should "provide #param" do
+ @controller.params = HashWithIndifferentAccess.new('type' => 'Wireless mouse', :brand => "Logitech")
+ @mum = widget(:mouse_cell, 'mum', :display, :color => 'grey', :type => 'shrew')
+ assert_equal nil, @mum.param(:whatever)
+ assert_equal 'grey', @mum.param(:color)
+ assert_equal 'grey', @mum.param('color')
+ assert_equal 'shrew', @mum.param(:type)
+ assert_equal 'Logitech', @mum.param(:brand)
+ end
end
end