Skip to content

Commit

Permalink
Added test coverage for option validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorrowe committed Mar 17, 2015
1 parent e7d9eb9 commit ab99399
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions aws-sdk-resources/spec/services/sqs/queue_poller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ module SQS

describe 'configuration' do

it 'raises an error on unknown configuration options' do
expect {
QueuePoller.new(queue_url, client:client, bad:'option')
}.to raise_error(ArgumentError, 'invalid option :bad')
expect {
QueuePoller.new(queue_url, client:client).poll(bad:'option') {|m|}
}.to raise_error(ArgumentError, 'invalid option :bad')
end

it 'is immutable' do
expect(poller.default_config).to be_frozen
expect(poller.default_config.request_params).to be_frozen
Expand Down

0 comments on commit ab99399

Please sign in to comment.