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.1.3 spec/jobs/source_job_spec.rb
rhosync-2.1.2 spec/jobs/source_job_spec.rb
rhosync-2.1.1 spec/jobs/source_job_spec.rb
rhosync-2.1.0 spec/jobs/source_job_spec.rb
rhosync-2.1.0.beta.2 spec/jobs/source_job_spec.rb
rhosync-2.1.0.beta.1 spec/jobs/source_job_spec.rb
rhosync-2.0.9 spec/jobs/source_job_spec.rb
rhosync-2.0.8 spec/jobs/source_job_spec.rb
rhosync-2.0.7 spec/jobs/source_job_spec.rb
rhosync-2.0.6 spec/jobs/source_job_spec.rb
rhosync-2.0.5 spec/jobs/source_job_spec.rb
rhosync-2.0.4 spec/jobs/source_job_spec.rb
rhosync-2.0.3 spec/jobs/source_job_spec.rb
rhosync-2.0.2 spec/jobs/source_job_spec.rb
rhosync-2.0.1 spec/jobs/source_job_spec.rb
rhosync-2.0.0 spec/jobs/source_job_spec.rb
rhosync-2.0.0.rc2 spec/jobs/source_job_spec.rb
rhosync-2.0.0.rc1 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta13 spec/jobs/source_job_spec.rb
rhosync-2.0.0.beta12 spec/jobs/source_job_spec.rb