activesalesforce 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,9 +21,6 @@
21
21
  SOFTWARE.
22
22
  =end
23
23
 
24
- require 'xsd/datatypes'
25
- require 'soap/soap'
26
-
27
24
  require File.dirname(__FILE__) + '/sobject_attributes'
28
25
 
29
26
 
@@ -1,42 +1,44 @@
1
1
  require File.join(File.dirname(__FILE__), '../../config/boot')
2
- require '~/dev/activesfdc/trunk/ActiveSalesforce/src/salesforce_connection_adapter'
2
+
3
+ require_gem 'activesalesforce'
4
+ require 'salesforce_connection_adapter'
5
+
3
6
  require File.dirname(__FILE__) + '/../test_helper'
4
7
 
5
8
 
6
9
 
7
10
  class AccountTest < Test::Unit::TestCase
8
-
11
+ def setup
12
+ ActiveRecord::Base.allow_concurrency = true
13
+ end
14
+
9
15
  def test_get_account
10
- products = Account.find(:all)
11
- #pp products
12
-
13
- products.each { |product| puts "#{product.Name}, #{product.Id}, #{product.LastModifiedById}, #{product.Description}" }
16
+ accounts = Account.find(:all)
17
+
18
+ #accounts.each { |account| puts "#{account.Name}, #{account.Id}, #{account.LastModifiedById}" }
14
19
 
15
20
  acme = Account.find(:first, :conditions => ["Name = 'Acme'"])
16
- puts acme.Name
17
21
 
18
22
  acme = Account.find_by_Id(acme.Id)
19
- puts acme.Name
20
23
 
21
24
  acme = Account.find_by_Name_and_LastModifiedById('salesforce.com', acme.LastModifiedById)
22
- puts acme.Name
23
25
  end
24
26
 
27
+
25
28
  def test_update_account
26
- #return
27
-
28
29
  acme = Account.find_by_Name('Acme')
29
- puts acme.Name
30
30
 
31
- acme.Website = "http://www.dutchforce.com/myImage2.jpg"
31
+ acme.Website = "http://www.dutchforce.com/#{Time.now}.jpg"
32
+ acme.LastModifiedDate = Time.now
32
33
 
33
34
  acme.save
34
35
  end
35
-
36
- def test_xcreate_account
36
+
37
+ def test_create_account
37
38
  dutchCo = Account.new
38
39
  dutchCo.Name = "DutchCo"
40
+ dutchCo.Website = "www.dutchco.com"
39
41
  dutchCo.save
40
- end
41
-
42
+ end
43
+
42
44
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: activesalesforce
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.2
7
- date: 2006-01-18 00:00:00 -05:00
6
+ version: 0.0.3
7
+ date: 2006-01-20 00:00:00 -05:00
8
8
  summary: ActiveSalesforce is an extension to the Rails Framework that allows for the dynamic creation and management of ActiveRecord objects through the use of Salesforce meta-data and uses a Salesforce.com organization as the backing store.
9
9
  require_paths:
10
10
  - lib
@@ -12,7 +12,7 @@ email: dchasman@salesforce.com
12
12
  homepage: http://rubyforge.org/projects/activesfdc/
13
13
  rubyforge_project:
14
14
  description:
15
- autorequire:
15
+ autorequire: salesforce_connection_adapter
16
16
  default_executable:
17
17
  bindir: bin
18
18
  has_rdoc: true