@@ -3,8 +3,9 @@ import * as t from 'io-ts';
33import {
44 CalculateMinerFeeInfoRequestBody ,
55 CalculateMinerFeeInfoResponse ,
6- PostCalculateMinerFeeInfo ,
7- } from '../../../src/typedRoutes/api/common/calculateMinerFeeInfo' ;
6+ PostV1CalculateMinerFeeInfo ,
7+ } from '../../../src/typedRoutes/api/v1/calculateMinerFeeInfo' ;
8+ import { PostV2CalculateMinerFeeInfo } from '../../../src/typedRoutes/api/v2/calculateMinerFeeInfo' ;
89import { assertDecode } from './common' ;
910import 'should' ;
1011import 'should-http' ;
@@ -301,25 +302,43 @@ describe('CalculateMinerFeeInfo codec tests', function () {
301302 } ) ;
302303 } ) ;
303304
304- describe ( 'PostCalculateMinerFeeInfo route definition' , function ( ) {
305- it ( 'should have the correct path' , function ( ) {
306- assert . strictEqual ( PostCalculateMinerFeeInfo . path , '/api/v[12] /calculateminerfeeinfo' ) ;
305+ describe ( 'PostV1CalculateMinerFeeInfo route definition' , function ( ) {
306+ it ( 'should have the correct path for v1 ' , function ( ) {
307+ assert . strictEqual ( PostV1CalculateMinerFeeInfo . path , '/api/v1 /calculateminerfeeinfo' ) ;
307308 } ) ;
308309
309310 it ( 'should have the correct HTTP method' , function ( ) {
310- assert . strictEqual ( PostCalculateMinerFeeInfo . method , 'POST' ) ;
311+ assert . strictEqual ( PostV1CalculateMinerFeeInfo . method , 'POST' ) ;
311312 } ) ;
312313
313314 it ( 'should have the correct request configuration' , function ( ) {
314- // Verify the route is configured with a request property
315- assert . ok ( PostCalculateMinerFeeInfo . request ) ;
315+ assert . ok ( PostV1CalculateMinerFeeInfo . request ) ;
316316 } ) ;
317317
318318 it ( 'should have the correct response types' , function ( ) {
319- // Check that the response object has the expected status codes
320- assert . ok ( PostCalculateMinerFeeInfo . response [ 200 ] ) ;
321- assert . ok ( PostCalculateMinerFeeInfo . response [ 400 ] ) ;
322- assert . ok ( PostCalculateMinerFeeInfo . response [ 404 ] ) ;
319+ assert . ok ( PostV1CalculateMinerFeeInfo . response [ 200 ] ) ;
320+ assert . ok ( PostV1CalculateMinerFeeInfo . response [ 400 ] ) ;
321+ assert . ok ( PostV1CalculateMinerFeeInfo . response [ 404 ] ) ;
322+ } ) ;
323+ } ) ;
324+
325+ describe ( 'PostV2CalculateMinerFeeInfo route definition' , function ( ) {
326+ it ( 'should have the correct path for v2' , function ( ) {
327+ assert . strictEqual ( PostV2CalculateMinerFeeInfo . path , '/api/v2/calculateminerfeeinfo' ) ;
328+ } ) ;
329+
330+ it ( 'should have the correct HTTP method' , function ( ) {
331+ assert . strictEqual ( PostV2CalculateMinerFeeInfo . method , 'POST' ) ;
332+ } ) ;
333+
334+ it ( 'should have the correct request configuration' , function ( ) {
335+ assert . ok ( PostV2CalculateMinerFeeInfo . request ) ;
336+ } ) ;
337+
338+ it ( 'should have the correct response types' , function ( ) {
339+ assert . ok ( PostV2CalculateMinerFeeInfo . response [ 200 ] ) ;
340+ assert . ok ( PostV2CalculateMinerFeeInfo . response [ 400 ] ) ;
341+ assert . ok ( PostV2CalculateMinerFeeInfo . response [ 404 ] ) ;
323342 } ) ;
324343 } ) ;
325344
0 commit comments