Sha256: c5208464242ba26d0a9318fde4d6c9f254850a8bf5571153e6e11b9f93d570e0

Contents?: true

Size: 818 Bytes

Versions: 3

Compression:

Stored size: 818 Bytes

Contents

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

describe Picasa::API::Album do
  describe "#list" do
    it "gives correct parsed body fragment" do
      stub_request(:get, "https://picasaweb.google.com/data/feed/api/user/w.wnetrzak").to_return(fixture("album/album-list.txt"))

      album_list = Picasa::API::Album.new(:user_id => "w.wnetrzak").list

      assert_equal 2, album_list.total_results
    end
  end

  describe "#show" do
    it "gives correct parsed body fragment" do
      stub_request(:get, "https://picasaweb.google.com/data/feed/api/user/w.wnetrzak/albumid/5243667126168669553").to_return(fixture("album/album-show.txt"))

      album_show = Picasa::API::Album.new(:user_id => "w.wnetrzak").show("5243667126168669553")

      assert_equal "Wojciech Wnętrzak", album_show.author.name
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
picasa-0.4.2 test/api/album_test.rb
picasa-0.4.1 test/api/album_test.rb
picasa-0.4.0 test/api/album_test.rb