test/pagarme/plan.rb in pagarme-1.8 vs test/pagarme/plan.rb in pagarme-1.9

- old
+ new

@@ -15,9 +15,21 @@ plan.name = "plano silver" plan.save assert plan.name == 'plano silver' end + should 'be able to search by anything' do + plan = test_plan + plan.create + + plans = PagarMe::Plan.find_by({:trial_days => 5}) + + assert plans.size + plans.each do |p| + assert p.trial_days == 5 + end + end + should 'be able to create with unformatted amount' do plan = test_plan plan.amount = 'R$ 10.00' plan.create assert plan.amount == 1000