Sha256: bdf08d7bf874d5145dd5d83e415031602278c76b1f2e15a0303f20f02e3566ea

Contents?: true

Size: 991 Bytes

Versions: 11

Compression:

Stored size: 991 Bytes

Contents

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

describe RTurk::GetHIT do

  before(:all) do
    faker('get_hit', :operation => 'GetHIT')
  end

  it "should fetch the details of a HIT" do
    response = RTurk.GetHIT(:hit_id => '1234abcd')
    response.type_id.should eql('YGKZ2W5X6YFZ08ZRXXZZ')
    response.auto_approval_delay.should eql(3600)
    response.status.should eql('Reviewable')
  end

  it "should not specify the ResponseGroup by default" do
    request = RTurk::GetHIT.new(:hit_id => '1234abcd')
    request.to_params["ResponseGroup"].should be_nil
  end

  it "should include the assignment summary in the response group if specified" do
    request = RTurk::GetHIT.new(:hit_id => '1234abcd', :include_assignment_summary => true)
    request.to_params["ResponseGroup"].should == {
      0 => "HITDetail", # default
      1 => "HITQuestion", # default
      2 => "Minimal", # default
      3 => "HITAssignmentSummary" # added
    }
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rturk-2.8.0 spec/operations/get_hit_spec.rb
rturk-2.7.0 spec/operations/get_hit_spec.rb
rturk-2.6.0 spec/operations/get_hit_spec.rb
rturk-2.5.2 spec/operations/get_hit_spec.rb
rturk-2.5.0 spec/operations/get_hit_spec.rb
rturk-2.4.1 spec/operations/get_hit_spec.rb
rturk-2.4.0 spec/operations/get_hit_spec.rb
rturk-2.3.6 spec/operations/get_hit_spec.rb
rturk-2.3.5 spec/operations/get_hit_spec.rb
rturk-2.3.4 spec/operations/get_hit_spec.rb
rturk-2.3.3 spec/operations/get_hit_spec.rb