Sha256: 928ce5ffd237d1641a55f3f3b309ee8830a858d5140e6876588ac69008468516
Contents?: true
Size: 1.2 KB
Versions: 1
Compression:
Stored size: 1.2 KB
Contents
require "test_helper" describe "QuakeliveApi::Profile::Awards::Experience" do make_my_diffs_pretty! before do profile = "dummy" content = fixture_awards('experience') stub_request(:get, "#{QuakeliveApi.site}/profile/awards/#{profile}/1").to_return(content) @awards = QuakeliveApi::Profile::Awards::Experience.new(profile) end describe "earned" do subject { @awards.earned } its(:size){ must_equal 11 } it { subject.must_be_instance_of Array } it { subject.must_include QuakeliveApi::Items::Award.new( 'http://cdn.quakelive.com/web/2013071600/images/awards/md/space_cadet_v2013071600.0.png', 'Unfortunately, we don\'t offer frequent flyer miles.', 'Space Cadet', Date.parse('18-12-2012'), 'Complete 1 online match (of at least 5 min.) in each space arena.') } end describe "unearned" do subject { @awards.unearned } its(:size){ must_equal 25 } it { subject.must_be_instance_of Array } it { subject.must_include QuakeliveApi::Items::Award.new( 'http://cdn.quakelive.com/web/2013071600/images/awards/md/champion_v2013071600.0.png', nil, 'Champion', nil, 'Complete 10,000 online matches.') } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quakelive_api-0.0.1 | test/quakelive_api/profile/awards/experience_test.rb |