Fix bug involving HttpStatusResponse

the `ok` in `r, ok := result.(*HttpStatusResponse)` would always fail unless the `result` being passed in was also of type `HttpStatusResponse`
This commit is contained in:
Timothy Lock
2018-01-17 16:47:14 -05:00
parent 132768c0fe
commit fe51698284
3 changed files with 19 additions and 6 deletions

View File

@@ -93,9 +93,9 @@ func TestHandleError(t *testing.T) {
func TestNew(t *testing.T) {
expected := Client{
ProductionURL: SandboxURL,
TimeOut: time.Second * 5,
ProductionURL: ProductionURL,
SandboxURL: SandboxURL,
TimeOut: time.Second * 5,
}
actual := New()
@@ -127,6 +127,7 @@ func TestNewWithConfig(t *testing.T) {
expected := Client{
ProductionURL: ProductionURL,
SandboxURL: SandboxURL,
TimeOut: time.Second * 2,
}
@@ -141,6 +142,7 @@ func TestNewWithConfigTimeout(t *testing.T) {
expected := Client{
ProductionURL: ProductionURL,
SandboxURL: SandboxURL,
TimeOut: time.Second * 5,
}