Sha256: 4fb87b0beb9c9aeafd6813ebfd6740c8345b63f7ed42765f9ba976eed27e36e7

Contents?: true

Size: 883 Bytes

Versions: 30

Compression:

Stored size: 883 Bytes

Contents

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

describe "SourceJob" do
  it_should_behave_like "SpecBootstrapHelper"
  it_should_behave_like "SourceAdapterHelper"
  
  it "should perform process_query" do
    set_state('test_db_storage' => @data)  
    SourceJob.perform('query',@s.id,@s.app_id,@s.user_id,nil,nil)
    verify_result(@s.docname(:md) => @data,
      @s.docname(:md_size) => @data.size.to_s)
  end
  
  it "should perform process_cud" do
    expected = {'backend_id'=>@product1}
    @product1['link'] = 'abc'
    set_state(@c.docname(:create) => {'1'=>@product1})
    SourceJob.perform('cud',@s.id,@s.app_id,@s.user_id,@c.id,nil)
    verify_result(@s.docname(:md) => expected,
      @s.docname(:md_size) => expected.size.to_s,
      @c.docname(:cd) => expected,
      @c.docname(:cd_size) => expected.size.to_s,
      @c.docname(:create) => {})
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rhosync-2.0.0.beta11 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta10 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta9 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta8 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta7 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta6 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta4 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta3 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta2 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta1 spec/jobs/source_job_spec.rb