Sha256: 2e83b68ce96e97d399cfb2ee287547abe8dd0277b47712c02feb75a4f5fc695e
Contents?: true
Size: 921 Bytes
Versions: 2
Compression:
Stored size: 921 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'builder' describe "Response" do before(:each) do @xml = <<EOXML <?xml version="1.0" encoding="utf-8"?> <SmsReturn xmlns="http://ws.cdyne.com/SmsWS/"> <StatusCode>1</StatusCode> <StatusText>Success</StatusText> <Completed>1</Completed> <TextID>12345678</TextID> <Demo>0</Demo> <ScheduledTime></ScheduledTime> <Responded>0</Responded> </SmsReturn> EOXML end after(:each) do @xml = '' end it "should convert an xml response body into a hash" do @response_hash = { :sms_return => { :status_code=>"1", :status_text=>"Success", :completed=>"1", :text_id=>"12345678", :demo=>"0", :scheduled_time=>nil, :responded=>"0", :xmlns=>"http://ws.cdyne.com/SmsWS/" } } SmsNotify::Response.parse(@xml).should == @response_hash end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cdyne-sms-notify-0.8.4 | spec/response_spec.rb |
cdyne-sms-notify-0.8.3 | spec/response_spec.rb |