activesalesforce 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/salesforce_active_record.rb +0 -3
- data/test/unit/account_test.rb +19 -17
- metadata +3 -3
data/test/unit/account_test.rb
CHANGED
@@ -1,42 +1,44 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '../../config/boot')
|
2
|
-
|
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
|
-
|
11
|
-
|
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
|
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
|
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.
|
7
|
-
date: 2006-01-
|
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
|