test/unit/tmdb_test.rb in ruby-tmdb3-0.3.1 vs test/unit/tmdb_test.rb in ruby-tmdb3-0.3.2
- old
+ new
@@ -42,19 +42,9 @@
test "getting nonexistent URL returns response object" do
test_response = Tmdb.get_url('http://thisisaurlthatdoesntexist.co.nz')
assert_equal 404, test_response.code.to_i
end
- test "API call without explicit language setting should use default language" do
- method = "search/movie"
- data = "hello"
- Tmdb.default_language = "es"
- url = Tmdb.base_api_url + '/' + method + '?api_key=' + Tmdb.api_key + '&language=' + Tmdb.default_language + '&query=' + CGI::escape(data.to_s)
- mock_response = stub(:code => "200", :body => '{"page":1,"results":[],"total_pages":0,"total_results":0}')
- Tmdb.expects(:get_url).with(url).returns(mock_response)
- Tmdb.api_call(method, {query: data})
- end
-
test "API call with explicit language setting should override default language" do
method = "movie"
data = "hello"
language = "blah"
url = Tmdb.base_api_url + '/' + method + "?api_key=" + Tmdb.api_key + "&language=" + language + '&query=' + CGI::escape(data.to_s)