Skip to content

Instantly share code, notes, and snippets.

@mlabouardy
Created January 19, 2018 21:32
Show Gist options
  • Save mlabouardy/01e3d08be2f3e2f324184add128844f4 to your computer and use it in GitHub Desktop.
Save mlabouardy/01e3d08be2f3e2f324184add128844f4 to your computer and use it in GitHub Desktop.
Unit test for Lambda handler
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestHandler(t *testing.T) {
movies, err := Handler(Request{
ID: 28,
})
assert.IsType(t, nil, err)
assert.NotEqual(t, 0, len(movies))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment