Sha256: e64c320a671db6d2d806c71883392722816f0bac2fcdcac2778673ac0b10a5c4

Contents?: true

Size: 1.09 KB

Versions: 3

Compression:

Stored size: 1.09 KB

Contents

require "test_helper"

describe "QuakeliveApi::Profile::Awards::Experience" do
  make_my_diffs_pretty!

  before do
    VCR.use_cassette("awards/experience") do
      @awards = QuakeliveApi::Profile::Awards::Experience.new('emqz')
    end
  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/2014080602/images/awards/md/space_cadet_v2014080602.0.png',
      'Unfortunately, we don\'t offer frequent flyer miles.',
      'Space Cadet',
      Date.parse('19.08.2013'),
      '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/2014080602/images/awards/md/champion_v2014080602.0.png',
      nil,
      'Champion',
      nil,
      'Complete 10,000 online matches.') }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
quakelive_api-0.1.2 test/quakelive_api/profile/awards/experience_test.rb
quakelive_api-0.1.1 test/quakelive_api/profile/awards/experience_test.rb
quakelive_api-0.1.0 test/quakelive_api/profile/awards/experience_test.rb