Sha256: 8b33d05a4d1d9bf5c16ecb8cab12af6e083c4e6c02b0c7f08be38b17178d5e96

Contents?: true

Size: 498 Bytes

Versions: 5

Compression:

Stored size: 498 Bytes

Contents

require "spec_helper"

describe NPR::Entity::List do
  before :each do
    response = mock_response "json/01_story_full_media.json" do
      NPR::API::Client.new(:apiKey => "key").query(:id => 999)
    end

    @list = response.list
  end

  it "extracts the attributes" do
    @list.title.should match /NPR/
    @list.teaser.should match /NPR/
    @list.miniTeaser.should match /NPR/
  end

  it "sets up relations" do
    @list.links.size.should eq 2
    @list.stories.size.should eq 1
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
npr-3.0.0 spec/unit/entity/list_spec.rb
npr-2.0.2 spec/unit/entity/list_spec.rb
npr-2.0.1 spec/unit/entity/list_spec.rb
npr-2.0.0 spec/unit/entity/list_spec.rb
npr-1.2.0 spec/unit/entity/list_spec.rb