From 0b509098aa39d8d8acdca75e8c08409d22c8ddfe Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Mon, 17 Nov 2014 01:49:27 -0800 Subject: [PATCH] commands: Fixed tests --- commands/command_test.go | 16 ++++++++-------- commands/response_test.go | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/commands/command_test.go b/commands/command_test.go index 2957ca32e..fdb06910d 100644 --- a/commands/command_test.go +++ b/commands/command_test.go @@ -17,21 +17,21 @@ func TestOptionValidation(t *testing.T) { opts, _ := cmd.GetOptions(nil) - req, _ := NewRequest(nil, nil, nil, nil, opts) + req, _ := NewRequest(nil, nil, nil, nil, nil, opts) req.SetOption("beep", true) res := cmd.Call(req) if res.Error() == nil { t.Error("Should have failed (incorrect type)") } - req, _ = NewRequest(nil, nil, nil, nil, opts) + req, _ = NewRequest(nil, nil, nil, nil, nil, opts) req.SetOption("beep", 5) res = cmd.Call(req) if res.Error() != nil { t.Error(res.Error(), "Should have passed") } - req, _ = NewRequest(nil, nil, nil, nil, opts) + req, _ = NewRequest(nil, nil, nil, nil, nil, opts) req.SetOption("beep", 5) req.SetOption("boop", "test") res = cmd.Call(req) @@ -39,7 +39,7 @@ func TestOptionValidation(t *testing.T) { t.Error("Should have passed") } - req, _ = NewRequest(nil, nil, nil, nil, opts) + req, _ = NewRequest(nil, nil, nil, nil, nil, opts) req.SetOption("b", 5) req.SetOption("B", "test") res = cmd.Call(req) @@ -47,28 +47,28 @@ func TestOptionValidation(t *testing.T) { t.Error("Should have passed") } - req, _ = NewRequest(nil, nil, nil, nil, opts) + req, _ = NewRequest(nil, nil, nil, nil, nil, opts) req.SetOption("foo", 5) res = cmd.Call(req) if res.Error() != nil { t.Error("Should have passed") } - req, _ = NewRequest(nil, nil, nil, nil, opts) + req, _ = NewRequest(nil, nil, nil, nil, nil, opts) req.SetOption(EncShort, "json") res = cmd.Call(req) if res.Error() != nil { t.Error("Should have passed") } - req, _ = NewRequest(nil, nil, nil, nil, opts) + req, _ = NewRequest(nil, nil, nil, nil, nil, opts) req.SetOption("b", "100") res = cmd.Call(req) if res.Error() != nil { t.Error("Should have passed") } - req, _ = NewRequest(nil, nil, nil, nil, opts) + req, _ = NewRequest(nil, nil, nil, nil, nil, opts) req.SetOption("b", ":)") res = cmd.Call(req) if res.Error() == nil { diff --git a/commands/response_test.go b/commands/response_test.go index fa5afccd4..f045a926a 100644 --- a/commands/response_test.go +++ b/commands/response_test.go @@ -15,7 +15,7 @@ func TestMarshalling(t *testing.T) { cmd := &Command{} opts, _ := cmd.GetOptions(nil) - req, _ := NewRequest(nil, nil, nil, nil, opts) + req, _ := NewRequest(nil, nil, nil, nil, nil, opts) res := NewResponse(req) res.SetOutput(TestOutput{"beep", "boop", 1337})