Skip to content

Instantly share code, notes, and snippets.

@thodges-gh
Forked from mlabouardy/main_test.go
Created January 23, 2018 02:11
Show Gist options
  • Save thodges-gh/4e698e9d2c4abc9c93a9d40142eaccbb to your computer and use it in GitHub Desktop.
Save thodges-gh/4e698e9d2c4abc9c93a9d40142eaccbb 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