Sha256: 22db171d964a50f987482d39abc0553f317af241c44eaa606e9ce7943adc1186

Contents?: true

Size: 664 Bytes

Versions: 4

Compression:

Stored size: 664 Bytes

Contents

 module CiviCrm::TestResponses
  def test_response(body, code = 200)
    body = CiviCrm::XML.encode(body) if !(body.kind_of? String)
    double(body: body, code: code)
  end

  def test_contact(params = {})
    {
      :id => '1',
      :contact_id => '1',
      :contact_type => 'Organization',
      :sort_name => 'Inner City Arts',
      :display_name => 'Inner City Arts',
      :name => 'Bruce Lee',
      :description => 'Foo bar',
      :created => '1345537759',
      :livemode => false
    }.merge(params)
  end

  def test_contact_array
    {
      :count => 3, :is_error => 0,
      :values => [test_contact, test_contact, test_contact]
    }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
civicrm-1.1.1 spec/support/civicrm_responses.rb
civicrm-1.1.0 spec/support/civicrm_responses.rb
civicrm-1.0.7 spec/support/civicrm_responses.rb
civicrm-1.0.6 spec/support/civicrm_responses.rb