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.6.18 spec/event_spec.rb
caren-api-0.6.17 spec/event_spec.rb
caren-api-0.6.16 spec/event_spec.rb
caren-api-0.6.15 spec/event_spec.rb
caren-api-0.6.14 spec/event_spec.rb
caren-api-0.6.13 spec/event_spec.rb
caren-api-0.6.12 spec/event_spec.rb
caren-api-0.6.11 spec/event_spec.rb
caren-api-0.6.10 spec/event_spec.rb
caren-api-0.6.9 spec/event_spec.rb
caren-api-0.6.8 spec/event_spec.rb
caren-api-0.6.7 spec/event_spec.rb
caren-api-0.6.6 spec/event_spec.rb
caren-api-0.6.5 spec/event_spec.rb
caren-api-0.6.4 spec/event_spec.rb
caren-api-0.6.3 spec/event_spec.rb
caren-api-0.6.2 spec/event_spec.rb
caren-api-0.6.1 spec/event_spec.rb
caren-api-0.6.0 spec/event_spec.rb
caren-api-0.5.20 spec/event_spec.rb