test/unit/tmdb_movie_test.rb in ruby-tmdb3-0.3.0 vs test/unit/tmdb_movie_test.rb in ruby-tmdb3-0.3.1

- old
+ new

@@ -33,12 +33,12 @@ movie = TmdbMovie.find(:imdb => "tt0401792") assert_movie_methodized(movie, 187) end test "find by title should return the full movie data when expand_results set to true" do - movie = TmdbMovie.find(:title => "Sin City", :limit => 1, :expand_results => true) - assert_movie_methodized(movie, 187) + movie = TmdbMovie.find(:title => "Iron Man", :limit => 1, :expand_results => true) + assert_movie_methodized(movie, 1726) end test "should raise exception if no arguments supplied to find" do assert_raise ArgumentError do TmdbMovie.find() @@ -103,11 +103,14 @@ Tmdb.expects(:api_call).with("search/movie", {query: "1"}, "foo") TmdbMovie.find(:id => 1, :imdb => 1, :title => 1, :language => "foo") end test "TmdbMovie.new should raise error if supplied with raw data for movie that doesn't exist" do - Tmdb.expects(:api_call).with("movie", {id: "999999999999"}, nil).returns(nil) + Tmdb.expects(:api_call).with("movie", {id: 999999999999}, nil).returns(nil) + Tmdb.expects(:api_call).with("movie/images", {id: 999999999999}, nil).returns(nil) + Tmdb.expects(:api_call).with("movie/releases", {id: 999999999999}, nil).returns(nil) + Tmdb.expects(:api_call).with("movie/casts", {id: 999999999999}, nil).returns(nil) assert_raise ArgumentError do TmdbMovie.new({"id" => 999999999999}, true) end end @@ -153,6 +156,6 @@ assert_equal @movie_data["spoken_languages"][x]["iso_639_1"], movie.spoken_languages[x].iso_639_1 assert_equal @movie_data["spoken_languages"][x]["name"], movie.spoken_languages[x].name end end -end \ No newline at end of file +end