Skip to content

Commit

Permalink
changed character spec
Browse files Browse the repository at this point in the history
  • Loading branch information
tconnolly committed Dec 9, 2014
1 parent 040077c commit 16a7bb5
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 102 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
bnet_api (0.1.1)
bnet_api (0.1.3)
httparty (= 0.13.3)

GEM
Expand Down
204 changes: 103 additions & 101 deletions spec/bnet_api/wow/wow_character_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,141 +11,143 @@
end
end

it "gets a character from the API" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf')

expect(character['lastModified']).not_to be_nil
expect(character['name']).to eq('Ragwolf')
expect(character['realm']).to eq('Thunderhorn')
expect(character['battlegroup']).to eq('Misery')
expect(character['class']).to eq(8)
expect(character['race']).to eq(5)
expect(character['gender']).to eq(1)
expect(character['level']).to eq(100)
expect(character['achievementPoints']).not_to be_nil
expect(character['thumbnail']).not_to be_nil
end
describe '.character' do
it "gets a character from the API" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf')

expect(character['lastModified']).not_to be_nil
expect(character['name']).to eq('Ragwolf')
expect(character['realm']).to eq('Thunderhorn')
expect(character['battlegroup']).to eq('Misery')
expect(character['class']).to eq(8)
expect(character['race']).to eq(5)
expect(character['gender']).to eq(1)
expect(character['level']).to eq(100)
expect(character['achievementPoints']).not_to be_nil
expect(character['thumbnail']).not_to be_nil
end

it "gets a character from the API with achievement data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :achievements)
it "gets a character from the API with achievement data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :achievements)

expect(character['achievements']).not_to be_nil
end
expect(character['achievements']).not_to be_nil
end

it "gets a character from the API with appearance data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :appearance)
it "gets a character from the API with appearance data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :appearance)

expect(character['appearance']).not_to be_nil
end
expect(character['appearance']).not_to be_nil
end

it "gets a character from the API with feed data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :feed)
it "gets a character from the API with feed data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :feed)

expect(character['feed']).not_to be_nil
end
expect(character['feed']).not_to be_nil
end

it "gets a character from the API with guild data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :guild)
it "gets a character from the API with guild data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :guild)

expect(character['guild']).not_to be_nil
end
expect(character['guild']).not_to be_nil
end

it "gets a character from the API with hunterPets data" do
character = BnetApi::WoW.character('Thunderhorn', 'Cruorfang', :hunterPets)
it "gets a character from the API with hunterPets data" do
character = BnetApi::WoW.character('Thunderhorn', 'Cruorfang', :hunterPets)

expect(character['hunterPets']).not_to be_nil
end
expect(character['hunterPets']).not_to be_nil
end

it "gets a character from the API with items data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :items)
it "gets a character from the API with items data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :items)

expect(character['items']).not_to be_nil
end
expect(character['items']).not_to be_nil
end

it "gets a character from the API with mounts data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :mounts)
it "gets a character from the API with mounts data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :mounts)

expect(character['mounts']).not_to be_nil
end
expect(character['mounts']).not_to be_nil
end

it "gets a character from the API with pets data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :pets)
it "gets a character from the API with pets data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :pets)

expect(character['pets']).not_to be_nil
end
expect(character['pets']).not_to be_nil
end

it "gets a character from the API with petSlots data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :petSlots)
it "gets a character from the API with petSlots data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :petSlots)

expect(character['petSlots']).not_to be_nil
end
expect(character['petSlots']).not_to be_nil
end

it "gets a character from the API with progression data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :progression)
it "gets a character from the API with progression data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :progression)

expect(character['progression']).not_to be_nil
end
expect(character['progression']).not_to be_nil
end

it "gets a character from the API with pvp data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :pvp)
it "gets a character from the API with pvp data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :pvp)

expect(character['pvp']).not_to be_nil
end
expect(character['pvp']).not_to be_nil
end

it "gets a character from the API with quests data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :quests)
it "gets a character from the API with quests data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :quests)

expect(character['quests']).not_to be_nil
end
expect(character['quests']).not_to be_nil
end

it "gets a character from the API with reputation data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :reputation)
it "gets a character from the API with reputation data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :reputation)

expect(character['reputation']).not_to be_nil
end
expect(character['reputation']).not_to be_nil
end

it "gets a character from the API with stats data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :stats)
it "gets a character from the API with stats data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :stats)

expect(character['stats']).not_to be_nil
end
expect(character['stats']).not_to be_nil
end

it "gets a character from the API with talents data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :talents)
it "gets a character from the API with talents data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :talents)

expect(character['talents']).not_to be_nil
end
expect(character['talents']).not_to be_nil
end

it "gets a character from the API with titles data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :titles)
it "gets a character from the API with titles data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :titles)

expect(character['titles']).not_to be_nil
end
expect(character['titles']).not_to be_nil
end

it "gets a character from the API with audit data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :audit)
it "gets a character from the API with audit data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :audit)

expect(character['audit']).not_to be_nil
end
expect(character['audit']).not_to be_nil
end

it "gets a character from the API with all additional data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :all)

expect(character['achievements']).not_to be_nil
expect(character['appearance']).not_to be_nil
expect(character['feed']).not_to be_nil
expect(character['guild']).not_to be_nil
expect(character['items']).not_to be_nil
expect(character['mounts']).not_to be_nil
expect(character['pets']).not_to be_nil
expect(character['petSlots']).not_to be_nil
expect(character['progression']).not_to be_nil
expect(character['pvp']).not_to be_nil
expect(character['quests']).not_to be_nil
expect(character['reputation']).not_to be_nil
expect(character['stats']).not_to be_nil
expect(character['talents']).not_to be_nil
expect(character['titles']).not_to be_nil
expect(character['audit']).not_to be_nil
it "gets a character from the API with all additional data" do
character = BnetApi::WoW.character('Thunderhorn', 'Ragwolf', :all)

expect(character['achievements']).not_to be_nil
expect(character['appearance']).not_to be_nil
expect(character['feed']).not_to be_nil
expect(character['guild']).not_to be_nil
expect(character['items']).not_to be_nil
expect(character['mounts']).not_to be_nil
expect(character['pets']).not_to be_nil
expect(character['petSlots']).not_to be_nil
expect(character['progression']).not_to be_nil
expect(character['pvp']).not_to be_nil
expect(character['quests']).not_to be_nil
expect(character['reputation']).not_to be_nil
expect(character['stats']).not_to be_nil
expect(character['talents']).not_to be_nil
expect(character['titles']).not_to be_nil
expect(character['audit']).not_to be_nil
end
end
end

0 comments on commit 16a7bb5

Please sign in to comment.