Sha256: fc22bc8a8b24f68f9703b0b4d3ed909518c21bc592ac59af9694f0f2065c720e

Contents?: true

Size: 1.67 KB

Versions: 8

Compression:

Stored size: 1.67 KB

Contents

# -*- encoding: utf-8 -*-
require "helper"

describe Picasa::Presenter::AlbumList do
  before do
    body = MultiXml.parse(fixture("presenters/album_list.xml"))
    @album_list = Picasa::Presenter::AlbumList.new(body["feed"])
  end

  it "has author name" do
    assert_equal "Wojciech Wnętrzak", @album_list.author.name
  end

  it "has author uri" do
    assert_equal "https://picasaweb.google.com/106136347770555028022", @album_list.author.uri
  end

  it "has links" do
    assert_equal 4, @album_list.links.size
  end

  it "has title" do
    assert_equal "106136347770555028022", @album_list.title
  end

  it "has updated" do
    assert_equal "2011-11-19T07:47:33+00:00", @album_list.updated.to_s
  end

  it "has icon" do
    expected = "https://lh3.googleusercontent.com/-6ezHc54U8x0/AAAAAAAAAAI/AAAAAAAAAAA/PBuxm7Ehn6E/s64-c/106136347770555028022.jpg"
    assert_equal expected, @album_list.icon
  end

  it "has generator" do
    assert_equal "Picasaweb", @album_list.generator
  end

  it "has total_results" do
    assert_equal 2, @album_list.total_results
  end

  it "has start_index" do
    assert_equal 1, @album_list.start_index
  end

  it "has items_per_page" do
    assert_equal 1000, @album_list.items_per_page
  end

  it "has user" do
    assert_equal "106136347770555028022", @album_list.user
  end

  it "has nickname" do
    assert_equal "Wojciech Wnętrzak", @album_list.nickname
  end

  it "has thumbnail" do
    expected = "https://lh3.googleusercontent.com/-6ezHc54U8x0/AAAAAAAAAAI/AAAAAAAAAAA/PBuxm7Ehn6E/s64-c/106136347770555028022.jpg"
    assert_equal expected, @album_list.thumbnail
  end

  it "has entries" do
    assert_equal 2, @album_list.entries.size
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
picasa-0.5.4 test/presenter/album_list_test.rb
picasa-0.5.3 test/presenter/album_list_test.rb
picasa-0.5.2 test/presenter/album_list_test.rb
picasa-0.5.1 test/presenter/album_list_test.rb
picasa-0.5.0 test/presenter/album_list_test.rb
picasa-0.4.2 test/presenter/album_list_test.rb
picasa-0.4.1 test/presenter/album_list_test.rb
picasa-0.4.0 test/presenter/album_list_test.rb