Sha256: 8ffe3c52b7b4df7621acff0a25bb50eace375e030199f997e9eedd0817528c4a

Contents?: true

Size: 632 Bytes

Versions: 1

Compression:

Stored size: 632 Bytes

Contents

require 'spec_helper'

RSpec.describe "Characters" do

  let(:uatu) { Uatu::Base.new }

  it 'retrieves characters' do
    hero = uatu.characters(name: 'Daredevil').first
    expect(hero.name).to eq 'Daredevil'
  end

  it 'retrieves a single character' do
    hero = uatu.character(1009262)
    expect(hero.name).to eq 'Daredevil'
  end

  it 'retrieves a resource from the character' do
    hero_comics = uatu.character_comics(1009262)
    expect(hero_comics.first.class).to eq Uatu::Comic

    characters = hero_comics.first.characters.items
    expect(characters.any?{|item| item['name'] == 'Daredevil' }).to be true
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
uatu-marvel-0.1.0 spec/integration/characters_spec.rb