@@ -99,7 +99,7 @@ describe('Transaction', () => {
99
99
} ) ;
100
100
} ) ;
101
101
102
- describe ( 'reapplygiven ' , ( ) => {
102
+ describe ( 'replyGiven ' , ( ) => {
103
103
it ( 'should throw an error if the transaction is announced' , ( ) => {
104
104
const transaction = new FakeTransaction ( TransactionType . TRANSFER ,
105
105
NetworkType . MIJIN_TEST ,
@@ -111,7 +111,7 @@ describe('Transaction', () => {
111
111
new TransactionInfo ( UInt64 . fromUint ( 100 ) , 1 , 'id_hash' , 'hash' , 'hash' ) ,
112
112
) ;
113
113
expect ( ( ) => {
114
- transaction . reapplygiven ( Deadline . create ( ) ) ;
114
+ transaction . replyGiven ( Deadline . create ( ) ) ;
115
115
} ) . to . throws ( 'an Announced transaction can\'t be modified' ) ;
116
116
} ) ;
117
117
it ( 'should return a new transaction' , ( ) => {
@@ -124,7 +124,7 @@ describe('Transaction', () => {
124
124
undefined ,
125
125
) ;
126
126
127
- const newTransaction = transaction . reapplygiven ( Deadline . create ( ) ) ;
127
+ const newTransaction = transaction . replyGiven ( Deadline . create ( ) ) ;
128
128
expect ( newTransaction ) . to . not . equal ( transaction ) ;
129
129
} ) ;
130
130
it ( 'should overide deadline properly' , ( ) => {
@@ -137,9 +137,11 @@ describe('Transaction', () => {
137
137
undefined ,
138
138
) ;
139
139
140
- const newTransaction = transaction . reapplygiven ( Deadline . create ( 3 ) ) ;
140
+ const newDeadline = Deadline . create ( 3 ) ;
141
+ const newTransaction = transaction . replyGiven ( newDeadline ) ;
141
142
const equal = newTransaction . deadline . value . equals ( transaction . deadline . value ) ;
142
143
const after = newTransaction . deadline . value . isAfter ( transaction . deadline . value ) ;
144
+ expect ( newTransaction . deadline ) . to . be . equal ( newDeadline ) ;
143
145
expect ( equal ) . to . be . equal ( false ) ;
144
146
expect ( after ) . to . be . equal ( true ) ;
145
147
} ) ;
0 commit comments