Sha256: da42a8dd476e57e52895866a744b4049026e19eeea25eaae58bcc0d1f71f3292

Contents?: true

Size: 633 Bytes

Versions: 3

Compression:

Stored size: 633 Bytes

Contents

RSpec.describe Message::PublisherEndpointInquiry do
  let(:message_type) { Message::PublisherEndpointInquiry::TYPE_CODE }
  let(:sender) { SecureRandom.uuid }

  let(:string) { message_type + sender }

  describe '.parse' do
    it 'should parse correctly' do
      message = Message::PublisherEndpointInquiry.parse string

      expect(message).to be_a Message::PublisherEndpointInquiry
      expect(message.sender).to eq sender
    end
  end

  describe '#to_s' do
    it 'should serialize correctly' do
      serialized = Message::PublisherEndpointInquiry.new(sender).to_s

      expect(serialized).to eq string
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aggro-0.0.4 spec/lib/aggro/message/publisher_endpoint_inquiry_spec.rb
aggro-0.0.3 spec/lib/aggro/message/publisher_endpoint_inquiry_spec.rb
aggro-0.0.2 spec/lib/aggro/message/publisher_endpoint_inquiry_spec.rb