Sha256: e247348ba815fc25db081bf6fb15254df7cae9aa907b30352c0297b6161c9a68

Contents?: true

Size: 710 Bytes

Versions: 27

Compression:

Stored size: 710 Bytes

Contents

require 'spec_helper'

RSpec.describe Shoryuken::Client do
  let(:credentials) { Aws::Credentials.new('access_key_id', 'secret_access_key') }
  let(:sqs)         { Aws::SQS::Client.new(stub_responses: true, credentials: credentials) }
  let(:queue_name)  { 'shoryuken' }
  let(:queue_url)   { 'https://eu-west-1.amazonaws.com:6059/123456789012/shoryuken' }

  describe '.queue' do
    before do
      described_class.sqs = sqs
    end

    it 'memoizes queues' do
      sqs.stub_responses(:get_queue_url, { queue_url: queue_url }, queue_url: 'xyz')

      expect(Shoryuken::Client.queues(queue_name).url).to eq queue_url
      expect(Shoryuken::Client.queues(queue_name).url).to eq queue_url
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
shoryuken-6.2.1 spec/shoryuken/client_spec.rb
shoryuken-6.2.0 spec/shoryuken/client_spec.rb
shoryuken-6.1.1 spec/shoryuken/client_spec.rb
shoryuken-6.1.0 spec/shoryuken/client_spec.rb
shoryuken-6.0.0 spec/shoryuken/client_spec.rb
shoryuken-5.3.2 spec/shoryuken/client_spec.rb
shoryuken-5.3.1 spec/shoryuken/client_spec.rb
shoryuken-5.3.0 spec/shoryuken/client_spec.rb
shoryuken-5.2.3 spec/shoryuken/client_spec.rb
shoryuken-5.2.2 spec/shoryuken/client_spec.rb
shoryuken-5.2.1 spec/shoryuken/client_spec.rb
shoryuken-5.2.0 spec/shoryuken/client_spec.rb
shoryuken-5.1.1 spec/shoryuken/client_spec.rb
shoryuken-5.1.0 spec/shoryuken/client_spec.rb
shoryuken-5.0.6 spec/shoryuken/client_spec.rb
shoryuken-5.0.5 spec/shoryuken/client_spec.rb
shoryuken-5.0.4 spec/shoryuken/client_spec.rb
shoryuken-5.0.3 spec/shoryuken/client_spec.rb
shoryuken-5.0.2 spec/shoryuken/client_spec.rb
shoryuken-5.0.1 spec/shoryuken/client_spec.rb