require 'spec_helper' describe Ecircle::JobPackage do before :all do date = 1.hour.from_now @options = { :request_id => '1234', :group_id => '5678', :send_out_date => date, :send_date_for_report => date, :report_email => 'report@dealvertise.de', :report_email_name => 'Your name', :location_name => 'Berlin', :subject => 'Berlin newsletter', :text => 'Newsletter text content', :html => 'Newsletter html content' } @doc = < #{Ecircle::Helper.date_format(@options[:send_out_date])} #{@options[:report_email]} Your name #{@options[:report_email]} Your name #{Ecircle::Helper.date_format(@options[:send_date_for_report])} #{@options[:subject]} #{@options[:text]} #{@options[:html]} #{@options[:report_email]} Your name #{@options[:report_email]} Your name xml end describe 'xml_for_asynch_calls' do it 'should generate valid xml' do Ecircle::JobPackage.soap_body(@options).should == @doc end end end