gomdb/gomdb_test.go
Christopher Herrera 93ab936da7 changin names
2015-07-17 16:16:57 -04:00

34 lines
667 B
Go
Executable file

package gomdb
import "testing"
func TestImdbSearchMovies(t *testing.T) {
resp, err := Search("Fight Club", "1999")
if err != nil {
t.Error("Failed Search Movies")
}
if resp.Search[0].Title != "Fight Club" {
t.Error("Wrong Movie")
}
}
func TestImdbGetMovieByTitle(t *testing.T) {
resp, err := MovieByTitle("Fight Club", "1999")
if err != nil {
t.Error("Failed GetMovieByTitle")
}
if resp.Title != "Fight Club" {
t.Error("Wrong Movie")
}
}
func TestImdbGetMovieByImdbID(t *testing.T) {
resp, err := MovieByImdbID("tt0137523")
if err != nil {
t.Error("Failed GetMovieByImdbID")
}
if resp.Title != "Fight Club" {
t.Error("Wrong Movie")
}
}