mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-06 07:26:47 +00:00
@@ -96,7 +96,7 @@ func TestGetChannelsString(t *testing.T) {
|
||||
testpassed = true
|
||||
}
|
||||
}
|
||||
if testpassed == false {
|
||||
if !testpassed {
|
||||
t.Error("test failed - slack GetChannelsString() error")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ package smsglobal
|
||||
import (
|
||||
"errors"
|
||||
"flag"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
@@ -164,7 +165,7 @@ func (s *SMSGlobal) SendMessage(to, message string) error {
|
||||
headers := make(map[string]string)
|
||||
headers["Content-Type"] = "application/x-www-form-urlencoded"
|
||||
|
||||
resp, err := common.SendHTTPRequest("POST",
|
||||
resp, err := common.SendHTTPRequest(http.MethodPost,
|
||||
smsGlobalAPIURL,
|
||||
headers,
|
||||
strings.NewReader(values.Encode()))
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/thrasher-/gocryptotrader/common"
|
||||
"github.com/thrasher-/gocryptotrader/communications/base"
|
||||
@@ -221,7 +222,7 @@ func (t *Telegram) SendHTTPRequest(path string, json []byte, result interface{})
|
||||
headers := make(map[string]string)
|
||||
headers["content-type"] = "application/json"
|
||||
|
||||
resp, err := common.SendHTTPRequest("POST", path, headers, bytes.NewBuffer(json))
|
||||
resp, err := common.SendHTTPRequest(http.MethodPost, path, headers, bytes.NewBuffer(json))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ func TestSetup(t *testing.T) {
|
||||
cfg := config.GetConfig()
|
||||
cfg.LoadConfig("../../testdata/configtest.json")
|
||||
T.Setup(cfg.GetCommunicationsConfig())
|
||||
if T.Name != "Telegram" || T.Enabled != false ||
|
||||
T.Token != "testest" || T.Verbose != false {
|
||||
if T.Name != "Telegram" || T.Enabled ||
|
||||
T.Token != "testest" || T.Verbose {
|
||||
t.Error("test failed - telegram Setup() error, unexpected setup values",
|
||||
T.Name, T.Enabled, T.Token, T.Verbose)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user