Sha256: 11435c2f8b6904df5954a1302cb68dcc975d764035b6ec2f41cada437c7c46a4

Contents?: true

Size: 1.09 KB

Versions: 18

Compression:

Stored size: 1.09 KB

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))

describe RTurk::SetHITAsReviewing do

  before(:all) do
    aws = YAML.load(File.open(File.join(SPEC_ROOT, 'mturk.yml')))
    RTurk.setup(aws['AWSAccessKeyId'], aws['AWSAccessKey'], :sandbox => true)
    faker('set_hit_as_reviewing', :operation => 'SetHITAsReviewing')
  end

  it "should ensure required params" do
    lambda{RTurk::SetHITAsReviewing()}.should raise_error(RTurk::MissingParameters)
  end
  
  it "should successfully request the operation" do
    RTurk::Requester.should_receive(:request).twice.with(
      hash_including('Operation' => 'SetHITAsReviewing'))
    RTurk::SetHITAsReviewing(:hit_id => "123456789") rescue RTurk::InvalidRequest
    RTurk::SetHITAsReviewing(:hit_id => "123456789", :revert => true) rescue RTurk::InvalidRequest
  end
  
  it "should parse and return the result" do
    RTurk::SetHITAsReviewing(:hit_id => "123456789").should
      be_a_kind_of RTurk::Response
    RTurk::SetHITAsReviewing(:hit_id => "123456789", :revert => true).should
      be_a_kind_of RTurk::Response
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rturk-2.12.1 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.12.0 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.11.3 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.11.2 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.11.1 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.11.0 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.10.3 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.10.2 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.10.1 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.10.0 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.9.0 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.8.0 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.7.0 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.6.0 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.5.2 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.5.0 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.4.1 spec/operations/set_hit_as_reviewing_spec.rb
rturk-2.4.0 spec/operations/set_hit_as_reviewing_spec.rb