Skip to content

Commit

Permalink
test: TestClaimType
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Dec 9, 2024
1 parent 8e9c279 commit 1e9ed4b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions agglayer/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -912,3 +912,29 @@ func TestL1InfoTreeLeafString(t *testing.T) {
})
}
}

func TestClaimType(t *testing.T) {
cases := []struct {
name string
claim Claim
expectedType string
}{
{
name: "Mainnet claim",
claim: &ClaimFromMainnnet{},
expectedType: "Mainnet",
},
{
name: "Rollup claim",
claim: &ClaimFromRollup{},
expectedType: "Rollup",
},
}

for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
actualType := c.claim.Type()
require.Equal(t, c.expectedType, actualType)
})
}
}

0 comments on commit 1e9ed4b

Please sign in to comment.