Skip to content

Commit

Permalink
Specs to authorize bills for all iva kinds.
Browse files Browse the repository at this point in the history
  • Loading branch information
leanucci committed Mar 11, 2011
1 parent 3505ffa commit 8346058
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions spec/bravo/bill_spec.rb
Expand Up @@ -84,21 +84,23 @@
detail["FchVtoPago"].should == "20111210" detail["FchVtoPago"].should == "20111210"
end end


it "should authorize a valid bill" do Bravo::BILL_TYPE[Bravo.own_iva_cond].keys.each do |target_iva_cond|
@bill.net = 1000000 it "should authorize a valid bill for #{target_iva_cond.to_s}" do
@bill.aliciva_id = 2 @bill.net = 1000000
@bill.doc_num = "30710151543" @bill.aliciva_id = 2
@bill.iva_cond = :responsable_inscripto @bill.doc_num = "30710151543"
@bill.concepto = "Servicios" @bill.iva_cond = target_iva_cond

@bill.concepto = "Servicios"
@bill.authorized?.should == false
@bill.authorize.should == true @bill.authorized?.should == false
@bill.authorized?.should == true @bill.authorize.should == true

@bill.authorized?.should == true
response = @bill.response

response = @bill.response
response.length.should == 28
response.cae.length.should == 14 response.length.should == 28
response.cae.length.should == 14
end
end end
end end
end end

0 comments on commit 8346058

Please sign in to comment.