diff options
author | =Corey Hulen <corey@hulen.com> | 2015-06-14 23:53:32 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-06-14 23:53:32 -0800 |
commit | cf7a05f80f68b5b1c8bcc0089679dd497cec2506 (patch) | |
tree | 70007378570a6962d7c175ca96af732b71aeb6da /Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/handlers_test.go | |
download | chat-cf7a05f80f68b5b1c8bcc0089679dd497cec2506.tar.gz chat-cf7a05f80f68b5b1c8bcc0089679dd497cec2506.tar.bz2 chat-cf7a05f80f68b5b1c8bcc0089679dd497cec2506.zip |
first commit
Diffstat (limited to 'Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/handlers_test.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/handlers_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/handlers_test.go b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/handlers_test.go new file mode 100644 index 000000000..89e87cc49 --- /dev/null +++ b/Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/handlers_test.go @@ -0,0 +1,24 @@ +package aws + +import "testing" + +func TestHandlerList(t *testing.T) { + r := &Request{} + l := HandlerList{} + l.PushBack(func(r *Request) { r.Data = Boolean(true) }) + l.Run(r) + if r.Data == nil { + t.Error("Expected handler to execute") + } +} + +func TestMultipleHandlers(t *testing.T) { + r := &Request{} + l := HandlerList{} + l.PushBack(func(r *Request) { r.Data = Boolean(true) }) + l.PushBack(func(r *Request) { r.Data = nil }) + l.Run(r) + if r.Data != nil { + t.Error("Expected handler to execute") + } +} |