test/supercharged/helpers/charges_helper_test.rb in supercharged-2.0.4 vs test/supercharged/helpers/charges_helper_test.rb in supercharged-2.1.0
- old
+ new
@@ -1,9 +1,11 @@
require 'test_helper'
class Supercharged::ChargesHelperTest < ActionView::TestCase
def test_min_value
- field = charge_form_amount_field(sample_service, { min: 500 })
+ self.stubs(:current_user).returns(User.new)
+ Charge.any_instance.stubs(:min_amount).returns(500)
+ field = charge_form_amount_field(sample_service)
field.must_include 'min="500"'
end
def sample_service
stub(mappings: { amount: "amount" })