Sha256: 668e3477413aeabd71b678c36a86ce6208a13eceed3144147f896a199682f7d7

Contents?: true

Size: 1.05 KB

Versions: 44

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'

describe "Event", "converting to xml" do

  before do
    @event_a = Caren::Event.new( :external_id => 1, :name => "Washing", :comment => "Real good", :start => "12:00",
                                 :duration => 30, :valid_from => Date.today, :valid_to => Date.today+1.day,
                                 :person_first_name => "Andre", :person_last_name => "Foeken", :person_male => true, :external_person_id => 100 )

    @event_b = Caren::Event.new( :external_id => 2, :name => "Clothing", :comment => "Real bad",
                                 :start => "13:00", :duration => 30, :valid_from => Date.today, :valid_to => Date.today+1.day,
                                 :person_first_name => "Oscar", :person_last_name => "Foeken", :person_male => true, :external_person_id => 101 )
  end

  it "should be able to convert an event to valid xml" do
    @event_a.should convert_to_valid_caren_xml
  end

  it "should be able to convert an array of events to valid xml" do
    [@event_a,@event_b].should convert_to_valid_caren_array_xml
  end

end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
caren-api-0.5.19 spec/event_spec.rb
caren-api-0.5.18 spec/event_spec.rb
caren-api-0.5.17 spec/event_spec.rb
caren-api-0.5.16 spec/event_spec.rb
caren-api-0.5.15 spec/event_spec.rb
caren-api-0.5.14 spec/event_spec.rb
caren-api-0.5.13 spec/event_spec.rb
caren-api-0.5.12 spec/event_spec.rb
caren-api-0.5.10 spec/event_spec.rb
caren-api-0.5.9 spec/event_spec.rb
caren-api-0.5.8 spec/event_spec.rb
caren-api-0.5.7 spec/event_spec.rb
caren-api-0.5.6 spec/event_spec.rb
caren-api-0.5.5 spec/event_spec.rb
caren-api-0.5.4 spec/event_spec.rb
caren-api-0.5.3 spec/event_spec.rb
caren-api-0.5.2 spec/event_spec.rb
caren-api-0.5.1 spec/event_spec.rb
caren-api-0.5.0 spec/event_spec.rb
caren-api-0.4.34 spec/event_spec.rb