Sha256: 0b82460c4eb6f06a9396d0e0c622090b71c24b4a1813d321bad65e9573840745

Contents?: true

Size: 636 Bytes

Versions: 7

Compression:

Stored size: 636 Bytes

Contents

# test_tv.rb

require_relative '../test_helper'

describe TMDB::TV do
  TMDB::API.api_key = API_KEY

    describe ".search" do
    it "should return correct results" do
      shows = TMDB::TV.search(query: 'walking dead')

      shows.first.name.must_equal "The Walking Dead"
    end
  end

  describe ".id" do

    let (:show) { TMDB::TV.id(1402) }

    it "should return the correct movie" do
      show.name.must_equal "The Walking Dead"
    end

    it "should allow iterating over results with multiple values" do
      show.genres.first.name.must_equal "Drama"
      show.genres.last.name.must_equal "Thriller"
    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tmdb-0.7.0 test/tmdb/test_tv.rb
tmdb-0.6.1 test/tmdb/test_tv.rb
tmdb-0.6.0 test/tmdb/test_tv.rb
tmdb-0.4.1 test/tmdb/test_tv.rb
tmdb-0.4.0 test/tmdb/test_tv.rb
tmdb-0.3.0 test/tmdb/test_tv.rb
tmdb-0.2.1 test/tmdb/test_tv.rb