Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Specs to authorize bills for all iva kinds.

  • Loading branch information...
commit 8346058770519ad228286953fb5c48708c4267ce 1 parent 3505ffa
@leanucci leanucci authored
Showing with 17 additions and 15 deletions.
  1. +17 −15 spec/bravo/bill_spec.rb
View
32 spec/bravo/bill_spec.rb
@@ -84,21 +84,23 @@
detail["FchVtoPago"].should == "20111210"
end
- it "should authorize a valid bill" do
- @bill.net = 1000000
- @bill.aliciva_id = 2
- @bill.doc_num = "30710151543"
- @bill.iva_cond = :responsable_inscripto
- @bill.concepto = "Servicios"
-
- @bill.authorized?.should == false
- @bill.authorize.should == true
- @bill.authorized?.should == true
-
- response = @bill.response
-
- response.length.should == 28
- response.cae.length.should == 14
+ Bravo::BILL_TYPE[Bravo.own_iva_cond].keys.each do |target_iva_cond|
+ it "should authorize a valid bill for #{target_iva_cond.to_s}" do
+ @bill.net = 1000000
+ @bill.aliciva_id = 2
+ @bill.doc_num = "30710151543"
+ @bill.iva_cond = target_iva_cond
+ @bill.concepto = "Servicios"
+
+ @bill.authorized?.should == false
+ @bill.authorize.should == true
+ @bill.authorized?.should == true
+
+ response = @bill.response
+
+ response.length.should == 28
+ response.cae.length.should == 14
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.