Sha256: 69ac884150fc8595f98071be31eb2ec5a4a2dcb19a03403b6ed438b01942e71e

Contents?: true

Size: 640 Bytes

Versions: 2

Compression:

Stored size: 640 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper.rb'

require 'date'

class TestTodo < Test::Unit::TestCase
  include Icalendar

  def test_todo_fields

    cal = Calendar.new

    t = cal.todo do
      summary      "Plan next vacations"
      description  "Let's have a break"
      percent      50
      seq          1
      add_category "TRAVEL"
      add_category "SPORTS"
    end

    calString = cal.to_ical

    assert_match(/PERCENT-COMPLETE:50/, calString)
    assert_match(/DESCRIPTION:Let's have a break/, calString)
    assert_match(/CATEGORIES:TRAVEL,SPORTS/, calString)
    assert_match(/SEQUENCE:1/, calString)

  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
icalendar-1.2.0 test/component/test_todo.rb
icalendar-1.2 test/component/test_todo.rb