mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 15:10:59 +00:00
simple common helper to parse & return path (for hmac etc) given url
This commit is contained in:
@@ -270,3 +270,13 @@ func TestUnixTimestampStrToTime(t *testing.T) {
|
||||
t.Error(fmt.Sprintf("Test failed. Expected '%s'. Actual '%s'.", expectedOutput, actualResult))
|
||||
}
|
||||
}
|
||||
|
||||
func TestURIPath(t *testing.T) {
|
||||
testURI := "https://api.gdax.com/accounts"
|
||||
expectedOutput := "/accounts"
|
||||
actualOutput := GetURIPath(testURI)
|
||||
if actualOutput != expectedOutput {
|
||||
t.Error(fmt.Sprintf("Test failed. Expected '%s'. Actual '%s'.",
|
||||
expectedOutput, actualOutput))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user