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

- old
+ new

@@ -90,13 +90,13 @@ TmdbMovie.find(:title => "Iron Man", :limit => limit) end end end - test "find should not pass language to Tmdb.api_call if language is not supplied" do - Tmdb.expects(:api_call).with("movie", {id: "1"}, nil).twice - Tmdb.expects(:api_call).with("search/movie", {query: "1"}, nil) + test "find should pass default language to Tmdb.api_call if language is not supplied" do + Tmdb.expects(:api_call).with("movie", {id: "1"}, Tmdb.default_language).twice + Tmdb.expects(:api_call).with("search/movie", {query: "1"}, Tmdb.default_language) TmdbMovie.find(:id => 1, :imdb => 1, :title => 1) end test "find should pass through language to Tmdb.api_call when language is supplied" do Tmdb.expects(:api_call).with("movie", {id: "1"}, "foo").twice @@ -115,10 +115,10 @@ end private def assert_movie_methodized(movie, movie_id) - @movie_data = Tmdb.api_call("movie", {id: movie_id.to_s}) + @movie_data = Tmdb.api_call("movie", {id: movie_id.to_s}, Tmdb.default_language) assert_equal @movie_data["adult"], movie.adult assert_equal @movie_data["budget"], movie.budget assert_equal @movie_data["homepage"], movie.homepage assert_equal @movie_data["id"], movie.id assert_equal @movie_data["imdb_id"], movie.imdb_id