22 lines
579 B
Go
22 lines
579 B
Go
package client
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/tech/sendico/pkg/discovery"
|
|
)
|
|
|
|
func TestNewRailGateway_NormalizesRail(t *testing.T) {
|
|
gw := NewRailGateway(nil, RailGatewayConfig{Rail: "card", Network: "tron"})
|
|
if got, want := gw.Rail(), discovery.RailCardPayout; got != want {
|
|
t.Fatalf("unexpected rail: got=%q want=%q", got, want)
|
|
}
|
|
}
|
|
|
|
func TestNewRailGateway_DefaultsToCryptoRail(t *testing.T) {
|
|
gw := NewRailGateway(nil, RailGatewayConfig{})
|
|
if got, want := gw.Rail(), discovery.RailCrypto; got != want {
|
|
t.Fatalf("unexpected rail: got=%q want=%q", got, want)
|
|
}
|
|
}
|