Sha256: 14bd601f4cf4e1eeef3812491cacde775b7b0a78d607543c58842616a50ab8fe
Contents?: true
Size: 1.5 KB
Versions: 3
Compression:
Stored size: 1.5 KB
Contents
require 'helper' describe '.base' do before do keys? @uatu = Uatu::Base.new end it "should be able to connect to Marvel API and bring a character" do hero = @uatu.character(1009262) hero.name.must_equal 'Daredevil' end it "should be able to connect to Marvel API and bring a character by name" do hero = @uatu.characters(name: 'Daredevil').first hero.name.must_equal 'Daredevil' end it "should be able to connect to Marvel API and bring comics from a character " do hero_comics = @uatu.character_comics(1009262) hero_comics.first.class.must_equal Uatu::Comic hero_comics.first.characters.items.any?{|item| item['name'].must_equal 'Daredevil' } end it "should be able to connect to Marvel API and bring a creator" do creator = @uatu.creator(2) creator.first_name.must_equal 'Garth' end it "should be able to connect to Marvel API and bring a creator by name" do creator = @uatu.creators(first_name: 'Garth', last_name: 'Ennis').first creator.first_name.must_equal 'Garth' end it "should be able to connect to Marvel API and bring an event" do event = @uatu.event(238) event.title.must_equal 'Civil War' end it "should be able to connect to Marvel API and bring an event by nae" do event = @uatu.events(name: 'Civil War').first event.id.must_equal 238 end it "should be able to connect to Marvel API and bring an comic" do comic = @uatu.comic(41530) comic.title.must_equal 'Ant-Man: So (Trade Paperback)' end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
uatu-marvel-0.0.2 | test/uatu/base_test.rb |
uatu-marvel-0.0.1.1 | test/uatu/base_test.rb |
uatu-marvel-0.0.1 | test/uatu/base_test.rb |