Sha256: 2a618c5c58a85b969b222b3d94a828ab534977b665d6e97a5135d3bb0aeaa7fb

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

require "test_helper"

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

  before do
    profile = "dummy"
    content = fixture_awards('career')
    stub_request(:get, "#{QuakeliveApi.site}/profile/awards/#{profile}/3").to_return(content)
    @awards = QuakeliveApi::Profile::Awards::CareerMilestones.new(profile)
  end

  describe "earned" do
    subject { @awards.earned }

    its(:size){ must_equal 8 }
    it { subject.must_be_instance_of Array }
    it { subject.must_include QuakeliveApi::Items::Award.new(
      'http://cdn.quakelive.com/web/2013071600/images/awards/md/guardian_v2013071600.0.png',
      'All you need now is an ear-piece, black suit and shades.',
      'Guardian',
      Date.parse('09-07-2009'),
      'Accumulate 100 Capture the Flag Defend Medals.') }
  end

  describe "unearned" do
    subject { @awards.unearned }

    its(:size){ must_equal 10 }
    it { subject.must_be_instance_of Array }
    it { subject.must_include QuakeliveApi::Items::Award.new(
      'http://cdn.quakelive.com/web/2013071600/images/awards/md/mvp_v2013071600.0.png',
      nil,
      'MVP',
      nil,
      'Accumulate 1000 total Capture the Flag Medals (Caps, Def, and Asst combined).') }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quakelive_api-0.0.1 test/quakelive_api/profile/awards/career_milestones_test.rb