Sha256: 402800e92581e843717d3b63d0d09e4211dcde7cc84e7554250824932c165667

Contents?: true

Size: 961 Bytes

Versions: 11

Compression:

Stored size: 961 Bytes

Contents

require "helper"

describe Picasa::Template do
  it "has name" do
    template = Picasa::Template.new(:new_album, {})
    assert_equal :new_album, template.name
  end

  it "has params" do
    template = Picasa::Template.new(:new_album, {:title => "My album"})
    assert_equal({:title => "My album"}, template.params)
  end

  describe "new_album" do
    it "renders title" do
      template = Picasa::Template.new(:new_album, {:title => "My album"})
      assert_match %q{<title type="text">My album</title>}, template.render
    end

    it "renders summary" do
      template = Picasa::Template.new(:new_album, {:summary => "My summary"})
      assert_match %q{<summary type="text">My summary</summary>}, template.render
    end

    it "escapes special characters" do
      template = Picasa::Template.new(:new_album, {:summary => "Marge & Homer"})
      assert_match %q{<summary type="text">Marge &amp; Homer</summary>}, template.render
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
picasa-0.9.1 test/template_test.rb
picasa-0.9.0 test/template_test.rb
picasa-0.8.0 test/template_test.rb
picasa-0.7.5 test/template_test.rb
picasa-0.7.4 test/template_test.rb
picasa-0.7.3 test/template_test.rb
picasa-0.7.2 test/template_test.rb
picasa-0.7.1 test/template_test.rb
picasa-0.7.0 test/template_test.rb
picasa-0.6.7 test/template_test.rb
picasa-0.6.6 test/template_test.rb