Skip to content

Instantly share code, notes, and snippets.

@trepidity
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save trepidity/ee32aa5d4a68bca3374b to your computer and use it in GitHub Desktop.

Select an option

Save trepidity/ee32aa5d4a68bca3374b to your computer and use it in GitHub Desktop.
Example AutoTask Appointment
require 'spec_helper'
describe AutotaskAPI::Appointment do
xml = '
<id>76</id>
<UserDefinedFields/>
<ResourceID xsi:type="xsd:int">29684244</ResourceID>
<Title xsi:type="xsd:string">Example Appointment</Title>
<StartDateTime xsi:type="xsd:dateTime">2015-02-07T05:21:00</StartDateTime>
<EndDateTime xsi:type="xsd:dateTime">2015-02-07T05:22:00</EndDateTime>
<Description xsi:type="xsd:string">Example of a really cool description</Description>
<CreatorResourceID xsi:type="xsd:int">296068</CreatorResourceID>
<CreateDateTime xsi:type="xsd:dateTime">2015-02-07T12:21:56.53</CreateDateTime>
<UpdateDateTime xsi:type="xsd:dateTime">2015-02-07T12:21:56.547</UpdateDateTime>
'
subject(:appointment) {AutotaskAPI::Appointment.new(xml)}
it 'create valid appointment' do
expect(subject.title).to eq('Example Appointment')
end
end
@trepidity
Copy link
Copy Markdown
Author

title is empty when I pass in this example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment