@@ -13,13 +13,13 @@ import (
1313 . "github.com/onsi/gomega"
1414)
1515
16- func CreateIOU (ii * integration.Infrastructure , identityLabel string , amount uint ) string {
16+ func CreateIOU (ii * integration.Infrastructure , identityLabel string , amount uint , approver string ) string {
1717 res , err := ii .Client ("borrower" ).CallView (
1818 "create" , common .JSONMarshall (& views.Create {
1919 Amount : amount ,
2020 Identity : identityLabel ,
2121 Lender : ii .Identity ("lender" ),
22- Approver : ii .Identity (" approver" ),
22+ Approver : ii .Identity (approver ),
2323 }),
2424 )
2525 Expect (err ).NotTo (HaveOccurred ())
@@ -33,15 +33,20 @@ func CheckState(ii *integration.Infrastructure, partyID, iouStateID string, expe
3333 Expect (common .JSONUnmarshalInt (res )).To (BeEquivalentTo (expected ))
3434}
3535
36- func UpdateIOU (ii * integration.Infrastructure , iouStateID string , amount uint ) {
36+ func UpdateIOU (ii * integration.Infrastructure , iouStateID string , amount uint , approver string ) {
3737 txIDBoxed , err := ii .Client ("borrower" ).CallView ("update" ,
3838 common .JSONMarshall (& views.Update {
3939 LinearID : iouStateID ,
4040 Amount : amount ,
41- Approver : ii .Identity (" approver" ),
41+ Approver : ii .Identity (approver ),
4242 }),
4343 )
4444 Expect (err ).NotTo (HaveOccurred ())
4545 txID := common .JSONUnmarshalString (txIDBoxed )
4646 Expect (ii .Client ("lender" ).IsTxFinal (txID )).NotTo (HaveOccurred ())
4747}
48+
49+ func InitApprover (ii * integration.Infrastructure , approver string ) {
50+ _ , err := ii .Client (approver ).CallView ("init" , nil )
51+ Expect (err ).NotTo (HaveOccurred ())
52+ }
0 commit comments