Sha256: 989c74969600add94a9891be5f137a0440fd34afdd3afcd1c136ee117deddd1a

Contents?: true

Size: 798 Bytes

Versions: 39

Compression:

Stored size: 798 Bytes

Contents

require 'spec_helper'

describe 'messages' do
  let(:client)    { create_client }
  let!(:account)  { create_account(client: client) }
  let!(:provider) { create_provider(account: account) }

  context "with a provision address request" do
    before(:each) do
      @request = client.addresses.create!(provider: provider, location: "us-west-2")
    end

    let(:request) { @request }

    it "should create a message for the address" do
      message = client.messages.create!(message: "hi der", request_id: request.id)

      expect(client.messages.get!(message.identity)).to eq(message)
    end

    it "should require collection url to create a message" do
      expect {
        client.messages.create!(message: "ohai")
      }.to raise_error(ArgumentError, /missing.*url/)
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
ey-core-3.6.0.autoscaling1 spec/messages_spec.rb
ey-core-3.6.4 spec/messages_spec.rb
ey-core-3.6.3 spec/messages_spec.rb
ey-core-3.6.1 spec/messages_spec.rb
groove-ey-core-3.6.3 spec/messages_spec.rb
groove-ey-core-3.6.2 spec/messages_spec.rb
groove-ey-core-3.6.1 spec/messages_spec.rb
ey-core-3.5.0 spec/messages_spec.rb
ey-core-3.4.4 spec/messages_spec.rb
ey-core-3.4.2 spec/messages_spec.rb
ey-core-3.4.1 spec/messages_spec.rb
ey-core-3.4.0 spec/messages_spec.rb
ey-core-3.3.1 spec/messages_spec.rb
ey-core-3.3.0 spec/messages_spec.rb
ey-core-3.2.6 spec/messages_spec.rb
ey-core-3.2.5 spec/messages_spec.rb
ey-core-3.2.4 spec/messages_spec.rb
ey-core-3.2.3 spec/messages_spec.rb
ey-core-3.2.2 spec/messages_spec.rb
ey-core-3.2.1 spec/messages_spec.rb