Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Spec for rejecting other params

  • Loading branch information...
commit 834808e31582b8b548079265897047c93a916744 1 parent 6523df3
@alan alan authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/client_spec.rb
View
6 spec/client_spec.rb
@@ -261,6 +261,12 @@
expect { @client.confirm_resource params_indifferent_access }.to_not raise_exception ArgumentError
end
+ it "rejects other params not required for the signature" do
+ # Once for confirm, once to fetch result
+ @client.expects(:request).twice.returns(stub(:parsed => {}))
+ @client.confirm_resource(@client.send(:sign_params, @params).merge('foo' => 'bar'))
+ end
+
it "doesn't confirm the resource when the signature is invalid" do
@client.expects(:request).never
@client.confirm_resource({:signature => 'xxx'}.merge(@params)) rescue nil
Please sign in to comment.
Something went wrong with that request. Please try again.