@@ -82,6 +82,56 @@ func TestKeeper_InitiateOutboundZEVM(t *testing.T) {
8282 require .Equal (t , types .CctxStatus_Aborted , newStatus )
8383 })
8484
85+ t .Run ("should return aborted status on unknown inbound status" , func (t * testing.T ) {
86+ // ARRANGE
87+ k , ctx , _ , _ := keepertest .CrosschainKeeperWithMocks (t , keepertest.CrosschainMockOptions {
88+ UseFungibleMock : true ,
89+ })
90+ gatewayZEVM := keeper .NewCCTXGatewayZEVM (* k )
91+
92+ // mock up CCTX data
93+ cctx := sample .CrossChainTx (t , "test" )
94+ cctx .CctxStatus = & types.Status {Status : types .CctxStatus_PendingOutbound }
95+ cctx .InboundParams .Status = types .InboundStatus (1000 )
96+
97+ // ACT
98+ // call InitiateOutbound
99+ newStatus , err := gatewayZEVM .InitiateOutbound (
100+ ctx ,
101+ keeper.InitiateOutboundConfig {CCTX : cctx , ShouldPayGas : true },
102+ )
103+
104+ // ASSERT
105+ require .NoError (t , err )
106+ require .Equal (t , types .CctxStatus_Aborted , cctx .CctxStatus .Status )
107+ require .Equal (t , types .CctxStatus_Aborted , newStatus )
108+ })
109+
110+ //t.Run("should return reverted status on invalid memo inbound status", func(t *testing.T) {
111+ // // ARRANGE
112+ // k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{
113+ // UseFungibleMock: true,
114+ // })
115+ // gatewayZEVM := keeper.NewCCTXGatewayZEVM(*k)
116+ //
117+ // // mock up CCTX data
118+ // cctx := sample.CrossChainTx(t, "test")
119+ // cctx.CctxStatus = &types.Status{Status: types.CctxStatus_PendingOutbound}
120+ // cctx.InboundParams.Status = types.InboundStatus_INVALID_MEMO
121+ //
122+ // // ACT
123+ // // call InitiateOutbound
124+ // newStatus, err := gatewayZEVM.InitiateOutbound(
125+ // ctx,
126+ // keeper.InitiateOutboundConfig{CCTX: cctx, ShouldPayGas: true},
127+ // )
128+ //
129+ // // ASSERT
130+ // require.NoError(t, err)
131+ // require.Equal(t, types.CctxStatus_Reverted, cctx.CctxStatus.Status)
132+ // require.Equal(t, types.CctxStatus_Reverted, newStatus)
133+ //})
134+
85135 t .Run (
86136 "should return aborted status on 'error during deposit that is not smart contract revert'" ,
87137 func (t * testing.T ) {
0 commit comments