Sha256: a789b86aab0cfb19a236b3c1b248a400b22022ed176f5ebc3d7c1f6d996b7424
Contents?: true
Size: 898 Bytes
Versions: 2
Compression:
Stored size: 898 Bytes
Contents
# Test out property parameter functionality $:.unshift File.join(File.dirname(__FILE__), "..", "lib") require 'pp' require 'date' require 'test/unit' require 'icalendar' class TestComponent < Test::Unit::TestCase # Create a calendar with an event for each test. def setup @cal = Icalendar::Calendar.new @event = Icalendar::Event.new end def test_property_parameters params = {"ALTREP" =>['"http://my.language.net"'], "LANGUAGE" => ["SPANISH"]} # params = {"ALTREP" =>["foo"], "LANGUAGE" => ["SPANISH"]} @event.summary("This is a test summary.", params) assert_equal params, @event.summary.ical_params @cal.add_event @event cal_str = @cal.to_ical puts cal_str cals = Icalendar::Parser.new(cal_str).parse pp cals event = cals.first.events.first assert_equal params, event.summary.ical_params end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
icalendar-1.1.3 | test/test_parameter.rb |
icalendar-1.1.2 | test/test_parameter.rb |