Sha256: 671191b37576aca52d9fe389d4de7257103888a79438b5d6af399bfd8f8ec0a9
Contents?: true
Size: 1.09 KB
Versions: 7
Compression:
Stored size: 1.09 KB
Contents
require 'test_helper' require 'aws/mechanical_turk' describe AWS::MechanicalTurk do before do @api = AWS::MechanicalTurk.new "key", "secret" end it "points to the endpoint" do @api.uri.must_equal "https://mechanicalturk.amazonaws.com" end it "works with the current version" do @api.version.must_equal "2011-10-01" end it "can be told to work in sandbox mode" do api = AWS::MechanicalTurk.new "key", "secret", true api.uri.must_equal "https://mechanicalturk.sandbox.amazonaws.com" end describe "API calls" do it "builds and signs calls with Operation and Service" do AWS::Connection.any_instance.expects(:call).with do |request| params = request.params params.wont_be_nil params["Operation"].must_equal "SearchHITs" params["Service"].must_equal "AWSMechanicalTurkRequester" params["AWSAccessKeyId"].must_equal "key" params["Version"].must_equal "2011-10-01" params["Signature"].wont_be_nil true end obj = AWS::MechanicalTurk.new "key", "secret" obj.SearchHITs end end end
Version data entries
7 entries across 7 versions & 1 rubygems