Sha256: 183edf21f1fe64b99693a178ab41b1e458742fed53874ad406b600f1dc47aa1a

Contents?: true

Size: 686 Bytes

Versions: 2

Compression:

Stored size: 686 Bytes

Contents

require 'spec_helper'

describe Message do
  describe "#xml_node" do
    let(:to) { random_mobile }
    let(:body) { random_string }
    let(:message) { Esendex::Message.new(to, body) }

    subject { message.xml_node }

    it "contains a to node" do
      subject.at_xpath('//message/to').content.should eq(to)
    end
    it "contains a body node" do
      subject.at_xpath('//message/body').content.should eq(body)
    end

    context "when from set" do
      let(:from) { random_string }

      before(:each) do
        message.from = from
      end

      it "contains a from node" do
        subject.at_xpath('//message/from').content.should eq(from)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
esendex-0.2.1 spec/message_spec.rb
esendex-0.2.0 spec/message_spec.rb