File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
backend/pkg/api/data_access Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ package dataaccess
2+
3+ import (
4+ "testing"
5+
6+ "github.com/gobitfly/beaconchain/pkg/api/types"
7+ "github.com/stretchr/testify/assert"
8+ )
9+
10+ func TestGetAllNetworks (t * testing.T ) {
11+ d := & DataAccessService {}
12+ t .Run ("GetAllNetworks" , func (t * testing.T ) {
13+ networks , err := d .GetAllNetworks ()
14+ assert .Nil (t , err )
15+ assert .Contains (t , networks , types.NetworkInfo {
16+ ChainId : 1 ,
17+ Name : "ethereum" ,
18+ NotificationsName : "mainnet" ,
19+ })
20+ assert .Contains (t , networks , types.NetworkInfo {
21+ ChainId : 100 ,
22+ Name : "gnosis" ,
23+ NotificationsName : "gnosis" ,
24+ })
25+ assert .Contains (t , networks , types.NetworkInfo {
26+ ChainId : 17000 ,
27+ Name : "holesky" ,
28+ NotificationsName : "holesky" ,
29+ })
30+ assert .Contains (t , networks , types.NetworkInfo {
31+ ChainId : 11155111 ,
32+ Name : "sepolia" ,
33+ NotificationsName : "sepolia" ,
34+ })
35+ })
36+ }
You can’t perform that action at this time.
0 commit comments