Sha256: d506542e263f46c6d03a3a60bb90d91070f58e518e3aef2dfcb4723ebea9ce0f

Contents?: true

Size: 1.01 KB

Versions: 5

Compression:

Stored size: 1.01 KB

Contents

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

describe "SourceJob" do
  it_behaves_like "SharedRhoconnectHelper", :rhoconnect_data => true do
    before(:each) do
      @s = Source.load(@s_fields[:name],@s_params)
    end
    
    it "should perform process_query" do
      set_state('test_db_storage' => @data)  
      SourceJob.perform('query',@s.id,@s.app_id,@s.user_id,nil)
      verify_doc_result(@s, {:md => @data,
                             :md_size => @data.size.to_s})
    end

    it "should perform process_cud" do
      expected = {'backend_id'=>@product1}
      @product1['link'] = 'abc'
      @s.push_queue(:create, @c.id, [[@s.name, [['1', @product1]]]])
      SourceJob.perform('cud',@s.id,@s.app_id,@s.user_id,nil)
      verify_source_queue_data(@s, :create => [])
      verify_doc_result(@s, {:md => expected,
                             :md_size => expected.size.to_s})
      verify_doc_result(@c, {:cd => expected,
                             :cd_size => expected.size.to_s})
    end
  end  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rhoconnect-4.0.3 spec/jobs/source_job_spec.rb
rhoconnect-4.0.2 spec/jobs/source_job_spec.rb
rhoconnect-4.0.1 spec/jobs/source_job_spec.rb
rhoconnect-4.0.0 spec/jobs/source_job_spec.rb
rhoconnect-4.0.0.beta.24 spec/jobs/source_job_spec.rb