restforce-db 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/restforce/db/accumulator.rb +13 -0
- data/lib/restforce/db/field_processor.rb +70 -0
- data/lib/restforce/db/instances/salesforce.rb +10 -0
- data/lib/restforce/db/record_types/salesforce.rb +2 -2
- data/lib/restforce/db/synchronizer.rb +2 -1
- data/lib/restforce/db/version.rb +1 -1
- data/lib/restforce/db.rb +1 -0
- data/test/cassettes/Restforce_DB_Associator/_run/given_a_BelongsTo_association/given_another_record_for_association/when_the_Salesforce_association_is_out_of_date/updates_the_association_ID_in_Salesforce.yml +135 -82
- data/test/cassettes/Restforce_DB_Associator/_run/given_a_BelongsTo_association/given_another_record_for_association/when_the_database_association_is_out_of_date/updates_the_associated_record_in_the_database.yml +152 -99
- data/test/cassettes/Restforce_DB_Cleaner/_run/given_a_synchronized_Salesforce_record/when_the_mapping_has_no_conditions/does_not_drop_the_synchronized_database_record.yml +120 -0
- data/test/cassettes/Restforce_DB_Cleaner/_run/given_a_synchronized_Salesforce_record/when_the_record_does_not_meet_the_mapping_conditions/for_a_non-Passive_strategy/drops_the_synchronized_database_record.yml +34 -36
- data/test/cassettes/Restforce_DB_Cleaner/_run/given_a_synchronized_Salesforce_record/when_the_record_meets_the_mapping_conditions/does_not_drop_the_synchronized_database_record.yml +35 -37
- data/test/cassettes/Restforce_DB_Initializer/_run/given_an_existing_database_record/for_an_Always_strategy/populates_Salesforce_with_the_new_record.yml +96 -44
- data/test/cassettes/Restforce_DB_Instances_Salesforce/_update_/updates_the_local_record_with_the_passed_attributes.yml +88 -35
- data/test/cassettes/Restforce_DB_Instances_Salesforce/_update_/updates_the_record_in_Salesforce_with_the_passed_attributes.yml +96 -43
- data/test/cassettes/Restforce_DB_RecordTypes_Salesforce/_create_/creates_a_record_in_Salesforce_from_the_passed_database_record_s_attributes.yml +81 -28
- data/test/cassettes/Restforce_DB_RecordTypes_Salesforce/_create_/updates_the_database_record_with_the_Salesforce_record_s_ID.yml +81 -28
- data/test/cassettes/Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_associated_database_record/updates_the_database_record.yml +88 -35
- data/test/cassettes/Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_associated_database_record/updates_the_salesforce_record.yml +96 -43
- data/test/lib/restforce/db/accumulator_test.rb +16 -0
- data/test/lib/restforce/db/cleaner_test.rb +15 -9
- data/test/lib/restforce/db/collector_test.rb +13 -15
- data/test/lib/restforce/db/field_processor_test.rb +51 -0
- data/test/lib/restforce/db/initializer_test.rb +10 -13
- data/test/lib/restforce/db/runner_cache_test.rb +1 -0
- data/test/support/utilities.rb +1 -0
- metadata +5 -3
- data/test/cassettes/Restforce_DB_Instances_Salesforce/_copy_/updates_the_record_with_the_attributes_from_the_copied_object.yml +0 -194
@@ -21,10 +21,10 @@ http_interactions:
|
|
21
21
|
message: OK
|
22
22
|
headers:
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Fri, 15 May 2015 01:18:24 GMT
|
25
25
|
Set-Cookie:
|
26
|
-
- BrowserId=
|
27
|
-
|
26
|
+
- BrowserId=j2QgC7H7QJ2fAYEE43Pj0g;Path=/;Domain=.salesforce.com;Expires=Tue,
|
27
|
+
14-Jul-2015 01:18:24 GMT
|
28
28
|
Expires:
|
29
29
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
30
30
|
Pragma:
|
@@ -37,9 +37,9 @@ http_interactions:
|
|
37
37
|
- chunked
|
38
38
|
body:
|
39
39
|
encoding: ASCII-8BIT
|
40
|
-
string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"
|
40
|
+
string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"1431652704097","token_type":"Bearer","instance_url":"https://<host>","signature":"nXpmcIeEZIsN2++65pm8yRR9GhzJ5rvZFWHa8lGdtaE=","access_token":"00D1a000000H3O9!AQ4AQOOuLg_qT_KH0d7e0MZl9eLqLOVkelXCvogl6uoC11zAr2MxSfN.Kp.FGeGl6RwwgcLORuGYbL2Rk2tznb5e22BOVEcb"}'
|
41
41
|
http_version:
|
42
|
-
recorded_at:
|
42
|
+
recorded_at: Fri, 15 May 2015 01:18:24 GMT
|
43
43
|
- request:
|
44
44
|
method: post
|
45
45
|
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c
|
@@ -52,7 +52,7 @@ http_interactions:
|
|
52
52
|
Content-Type:
|
53
53
|
- application/json
|
54
54
|
Authorization:
|
55
|
-
- OAuth 00D1a000000H3O9!
|
55
|
+
- OAuth 00D1a000000H3O9!AQ4AQOOuLg_qT_KH0d7e0MZl9eLqLOVkelXCvogl6uoC11zAr2MxSfN.Kp.FGeGl6RwwgcLORuGYbL2Rk2tznb5e22BOVEcb
|
56
56
|
Accept-Encoding:
|
57
57
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
58
58
|
Accept:
|
@@ -63,28 +63,28 @@ http_interactions:
|
|
63
63
|
message: Created
|
64
64
|
headers:
|
65
65
|
Date:
|
66
|
-
-
|
66
|
+
- Fri, 15 May 2015 01:18:25 GMT
|
67
67
|
Set-Cookie:
|
68
|
-
- BrowserId=
|
69
|
-
|
68
|
+
- BrowserId=06htfX4VR7OCduFgcqXWug;Path=/;Domain=.salesforce.com;Expires=Tue,
|
69
|
+
14-Jul-2015 01:18:25 GMT
|
70
70
|
Expires:
|
71
71
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
72
72
|
Sforce-Limit-Info:
|
73
|
-
- api-usage=
|
73
|
+
- api-usage=590/15000
|
74
74
|
Location:
|
75
|
-
- "/services/data/v26.0/sobjects/CustomObject__c/
|
75
|
+
- "/services/data/v26.0/sobjects/CustomObject__c/a001a000001ZoCTAA0"
|
76
76
|
Content-Type:
|
77
77
|
- application/json;charset=UTF-8
|
78
78
|
Transfer-Encoding:
|
79
79
|
- chunked
|
80
80
|
body:
|
81
81
|
encoding: ASCII-8BIT
|
82
|
-
string: '{"id":"
|
82
|
+
string: '{"id":"a001a000001ZoCTAA0","success":true,"errors":[]}'
|
83
83
|
http_version:
|
84
|
-
recorded_at:
|
84
|
+
recorded_at: Fri, 15 May 2015 01:18:25 GMT
|
85
85
|
- request:
|
86
86
|
method: get
|
87
|
-
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%
|
87
|
+
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001ZoCTAA0%27
|
88
88
|
body:
|
89
89
|
encoding: US-ASCII
|
90
90
|
string: ''
|
@@ -92,7 +92,7 @@ http_interactions:
|
|
92
92
|
User-Agent:
|
93
93
|
- Faraday v0.9.1
|
94
94
|
Authorization:
|
95
|
-
- OAuth 00D1a000000H3O9!
|
95
|
+
- OAuth 00D1a000000H3O9!AQ4AQOOuLg_qT_KH0d7e0MZl9eLqLOVkelXCvogl6uoC11zAr2MxSfN.Kp.FGeGl6RwwgcLORuGYbL2Rk2tznb5e22BOVEcb
|
96
96
|
Accept-Encoding:
|
97
97
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
98
98
|
Accept:
|
@@ -103,27 +103,80 @@ http_interactions:
|
|
103
103
|
message: OK
|
104
104
|
headers:
|
105
105
|
Date:
|
106
|
-
-
|
106
|
+
- Fri, 15 May 2015 01:18:26 GMT
|
107
107
|
Set-Cookie:
|
108
|
-
- BrowserId=
|
109
|
-
|
108
|
+
- BrowserId=UoZgSeuFSmu8cr4-wpo_iw;Path=/;Domain=.salesforce.com;Expires=Tue,
|
109
|
+
14-Jul-2015 01:18:26 GMT
|
110
110
|
Expires:
|
111
111
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
112
112
|
Sforce-Limit-Info:
|
113
|
-
- api-usage=
|
113
|
+
- api-usage=587/15000
|
114
114
|
Content-Type:
|
115
115
|
- application/json;charset=UTF-8
|
116
116
|
Transfer-Encoding:
|
117
117
|
- chunked
|
118
118
|
body:
|
119
119
|
encoding: ASCII-8BIT
|
120
|
-
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/
|
120
|
+
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001ZoCTAA0"},"Id":"a001a000001ZoCTAA0","SystemModstamp":"2015-05-15T01:18:25.000+0000","Name":"Custom
|
121
121
|
object","Example_Field__c":"Some sample text"}]}'
|
122
122
|
http_version:
|
123
|
-
recorded_at:
|
123
|
+
recorded_at: Fri, 15 May 2015 01:18:26 GMT
|
124
|
+
- request:
|
125
|
+
method: get
|
126
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/describe
|
127
|
+
body:
|
128
|
+
encoding: US-ASCII
|
129
|
+
string: ''
|
130
|
+
headers:
|
131
|
+
User-Agent:
|
132
|
+
- Faraday v0.9.1
|
133
|
+
Authorization:
|
134
|
+
- OAuth 00D1a000000H3O9!AQ4AQOOuLg_qT_KH0d7e0MZl9eLqLOVkelXCvogl6uoC11zAr2MxSfN.Kp.FGeGl6RwwgcLORuGYbL2Rk2tznb5e22BOVEcb
|
135
|
+
Accept-Encoding:
|
136
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
137
|
+
Accept:
|
138
|
+
- "*/*"
|
139
|
+
response:
|
140
|
+
status:
|
141
|
+
code: 200
|
142
|
+
message: OK
|
143
|
+
headers:
|
144
|
+
Date:
|
145
|
+
- Fri, 15 May 2015 01:18:27 GMT
|
146
|
+
Set-Cookie:
|
147
|
+
- BrowserId=c9AkwNH6STubgb6B8OZILQ;Path=/;Domain=.salesforce.com;Expires=Tue,
|
148
|
+
14-Jul-2015 01:18:27 GMT
|
149
|
+
Expires:
|
150
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
151
|
+
Sforce-Limit-Info:
|
152
|
+
- api-usage=587/15000
|
153
|
+
Org.eclipse.jetty.server.include.etag:
|
154
|
+
- 7057c783
|
155
|
+
Last-Modified:
|
156
|
+
- Wed, 01 Apr 2015 17:47:03 GMT
|
157
|
+
Content-Type:
|
158
|
+
- application/json;charset=UTF-8
|
159
|
+
Etag:
|
160
|
+
- 7057c78-gzip"
|
161
|
+
Transfer-Encoding:
|
162
|
+
- chunked
|
163
|
+
body:
|
164
|
+
encoding: ASCII-8BIT
|
165
|
+
string: '{"activateable":false,"childRelationships":[{"cascadeDelete":true,"childSObject":"Attachment","deprecatedAndHidden":false,"field":"ParentId","relationshipName":"Attachments","restrictedDelete":false},{"cascadeDelete":true,"childSObject":"ContentDocumentLink","deprecatedAndHidden":false,"field":"LinkedEntityId","relationshipName":null,"restrictedDelete":false},{"cascadeDelete":false,"childSObject":"ContentVersion","deprecatedAndHidden":false,"field":"FirstPublishLocationId","relationshipName":null,"restrictedDelete":false},{"cascadeDelete":true,"childSObject":"CustomObjectDetail__c","deprecatedAndHidden":false,"field":"CustomObject__c","relationshipName":"CustomObjectDetails__r","restrictedDelete":false},{"cascadeDelete":true,"childSObject":"EntitySubscription","deprecatedAndHidden":false,"field":"ParentId","relationshipName":"FeedSubscriptionsForEntity","restrictedDelete":false},{"cascadeDelete":false,"childSObject":"FeedComment","deprecatedAndHidden":false,"field":"ParentId","relationshipName":null,"restrictedDelete":false},{"cascadeDelete":true,"childSObject":"FeedItem","deprecatedAndHidden":false,"field":"ParentId","relationshipName":null,"restrictedDelete":false},{"cascadeDelete":true,"childSObject":"NewsFeed","deprecatedAndHidden":false,"field":"ParentId","relationshipName":null,"restrictedDelete":false},{"cascadeDelete":true,"childSObject":"Note","deprecatedAndHidden":false,"field":"ParentId","relationshipName":"Notes","restrictedDelete":false},{"cascadeDelete":true,"childSObject":"NoteAndAttachment","deprecatedAndHidden":false,"field":"ParentId","relationshipName":"NotesAndAttachments","restrictedDelete":false},{"cascadeDelete":true,"childSObject":"ProcessInstance","deprecatedAndHidden":false,"field":"TargetObjectId","relationshipName":"ProcessInstances","restrictedDelete":false},{"cascadeDelete":false,"childSObject":"ProcessInstanceHistory","deprecatedAndHidden":false,"field":"TargetObjectId","relationshipName":"ProcessSteps","restrictedDelete":false},{"cascadeDelete":true,"childSObject":"UserProfileFeed","deprecatedAndHidden":false,"field":"ParentId","relationshipName":null,"restrictedDelete":false}],"createable":true,"custom":true,"customSetting":false,"deletable":true,"deprecatedAndHidden":false,"feedEnabled":false,"fields":[{"autoNumber":false,"byteLength":18,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":false,"custom":false,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":true,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":true,"htmlFormatted":false,"idLookup":true,"inlineHelpText":null,"label":"Record
|
166
|
+
ID","length":18,"name":"Id","nameField":false,"namePointing":false,"nillable":false,"permissionable":false,"picklistValues":[],"precision":0,"referenceTo":[],"relationshipName":null,"relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"tns:ID","sortable":true,"type":"id","unique":false,"updateable":false,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":18,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":true,"custom":false,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":true,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":true,"htmlFormatted":false,"idLookup":false,"inlineHelpText":null,"label":"Owner
|
167
|
+
ID","length":18,"name":"OwnerId","nameField":false,"namePointing":true,"nillable":false,"permissionable":false,"picklistValues":[],"precision":0,"referenceTo":["Group","User"],"relationshipName":"Owner","relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"tns:ID","sortable":true,"type":"reference","unique":false,"updateable":true,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":0,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":false,"custom":false,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":true,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":true,"htmlFormatted":false,"idLookup":false,"inlineHelpText":null,"label":"Deleted","length":0,"name":"IsDeleted","nameField":false,"namePointing":false,"nillable":false,"permissionable":false,"picklistValues":[],"precision":0,"referenceTo":[],"relationshipName":null,"relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"xsd:boolean","sortable":true,"type":"boolean","unique":false,"updateable":false,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":240,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":true,"custom":false,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":true,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":true,"htmlFormatted":false,"idLookup":true,"inlineHelpText":null,"label":"CustomObject
|
168
|
+
Name","length":80,"name":"Name","nameField":true,"namePointing":false,"nillable":true,"permissionable":false,"picklistValues":[],"precision":0,"referenceTo":[],"relationshipName":null,"relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"xsd:string","sortable":true,"type":"string","unique":false,"updateable":true,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":0,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":false,"custom":false,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":true,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":false,"htmlFormatted":false,"idLookup":false,"inlineHelpText":null,"label":"Created
|
169
|
+
Date","length":0,"name":"CreatedDate","nameField":false,"namePointing":false,"nillable":false,"permissionable":false,"picklistValues":[],"precision":0,"referenceTo":[],"relationshipName":null,"relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"xsd:dateTime","sortable":true,"type":"datetime","unique":false,"updateable":false,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":18,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":false,"custom":false,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":true,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":true,"htmlFormatted":false,"idLookup":false,"inlineHelpText":null,"label":"Created
|
170
|
+
By ID","length":18,"name":"CreatedById","nameField":false,"namePointing":false,"nillable":false,"permissionable":false,"picklistValues":[],"precision":0,"referenceTo":["User"],"relationshipName":"CreatedBy","relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"tns:ID","sortable":true,"type":"reference","unique":false,"updateable":false,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":0,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":false,"custom":false,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":true,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":false,"htmlFormatted":false,"idLookup":false,"inlineHelpText":null,"label":"Last
|
171
|
+
Modified Date","length":0,"name":"LastModifiedDate","nameField":false,"namePointing":false,"nillable":false,"permissionable":false,"picklistValues":[],"precision":0,"referenceTo":[],"relationshipName":null,"relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"xsd:dateTime","sortable":true,"type":"datetime","unique":false,"updateable":false,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":18,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":false,"custom":false,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":true,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":true,"htmlFormatted":false,"idLookup":false,"inlineHelpText":null,"label":"Last
|
172
|
+
Modified By ID","length":18,"name":"LastModifiedById","nameField":false,"namePointing":false,"nillable":false,"permissionable":false,"picklistValues":[],"precision":0,"referenceTo":["User"],"relationshipName":"LastModifiedBy","relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"tns:ID","sortable":true,"type":"reference","unique":false,"updateable":false,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":0,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":false,"custom":false,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":true,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":false,"htmlFormatted":false,"idLookup":false,"inlineHelpText":null,"label":"System
|
173
|
+
Modstamp","length":0,"name":"SystemModstamp","nameField":false,"namePointing":false,"nillable":false,"permissionable":false,"picklistValues":[],"precision":0,"referenceTo":[],"relationshipName":null,"relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"xsd:dateTime","sortable":true,"type":"datetime","unique":false,"updateable":false,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":765,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":true,"custom":true,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":false,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":true,"htmlFormatted":false,"idLookup":false,"inlineHelpText":null,"label":"Example
|
174
|
+
Field","length":255,"name":"Example_Field__c","nameField":false,"namePointing":false,"nillable":true,"permissionable":true,"picklistValues":[],"precision":0,"referenceTo":[],"relationshipName":null,"relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"xsd:string","sortable":true,"type":"string","unique":false,"updateable":true,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":18,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":true,"custom":true,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":false,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":true,"htmlFormatted":false,"idLookup":false,"inlineHelpText":null,"label":"Friend","length":18,"name":"Friend__c","nameField":false,"namePointing":false,"nillable":true,"permissionable":true,"picklistValues":[],"precision":0,"referenceTo":["Contact"],"relationshipName":"Friend__r","relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"tns:ID","sortable":true,"type":"reference","unique":false,"updateable":true,"writeRequiresMasterRead":false},{"autoNumber":false,"byteLength":0,"calculated":false,"calculatedFormula":null,"cascadeDelete":false,"caseSensitive":false,"controllerName":null,"createable":true,"custom":true,"defaultValue":null,"defaultValueFormula":null,"defaultedOnCreate":true,"dependentPicklist":false,"deprecatedAndHidden":false,"digits":0,"displayLocationInDecimal":false,"externalId":false,"filterable":true,"groupable":true,"htmlFormatted":false,"idLookup":false,"inlineHelpText":null,"label":"Visible","length":0,"name":"Visible__c","nameField":false,"namePointing":false,"nillable":false,"permissionable":true,"picklistValues":[],"precision":0,"referenceTo":[],"relationshipName":null,"relationshipOrder":null,"restrictedDelete":false,"restrictedPicklist":false,"scale":0,"soapType":"xsd:boolean","sortable":true,"type":"boolean","unique":false,"updateable":true,"writeRequiresMasterRead":false}],"keyPrefix":"a00","label":"CustomObject","labelPlural":"CustomObjects","layoutable":true,"listviewable":null,"lookupLayoutable":null,"mergeable":false,"name":"CustomObject__c","queryable":true,"recordTypeInfos":[{"available":true,"defaultRecordTypeMapping":true,"name":"Master","recordTypeId":"012000000000000AAA"}],"replicateable":true,"retrieveable":true,"searchLayoutable":null,"searchable":true,"triggerable":true,"undeletable":true,"updateable":true,"urls":{"uiEditTemplate":"https://<host>/{ID}/e","sobject":"/services/data/v26.0/sobjects/CustomObject__c","uiDetailTemplate":"https://<host>/{ID}","describe":"/services/data/v26.0/sobjects/CustomObject__c/describe","rowTemplate":"/services/data/v26.0/sobjects/CustomObject__c/{ID}","uiNewRecord":"https://<host>/a00/e"}}'
|
175
|
+
http_version:
|
176
|
+
recorded_at: Fri, 15 May 2015 01:18:27 GMT
|
124
177
|
- request:
|
125
178
|
method: patch
|
126
|
-
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/
|
179
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001ZoCTAA0
|
127
180
|
body:
|
128
181
|
encoding: UTF-8
|
129
182
|
string: '{"Name":"Some new name","Example_Field__c":"New sample text"}'
|
@@ -133,7 +186,7 @@ http_interactions:
|
|
133
186
|
Content-Type:
|
134
187
|
- application/json
|
135
188
|
Authorization:
|
136
|
-
- OAuth 00D1a000000H3O9!
|
189
|
+
- OAuth 00D1a000000H3O9!AQ4AQOOuLg_qT_KH0d7e0MZl9eLqLOVkelXCvogl6uoC11zAr2MxSfN.Kp.FGeGl6RwwgcLORuGYbL2Rk2tznb5e22BOVEcb
|
137
190
|
Accept-Encoding:
|
138
191
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
139
192
|
Accept:
|
@@ -144,22 +197,22 @@ http_interactions:
|
|
144
197
|
message: No Content
|
145
198
|
headers:
|
146
199
|
Date:
|
147
|
-
-
|
200
|
+
- Fri, 15 May 2015 01:18:29 GMT
|
148
201
|
Set-Cookie:
|
149
|
-
- BrowserId=
|
150
|
-
|
202
|
+
- BrowserId=R3u76k9wSBGp4-fUj63zig;Path=/;Domain=.salesforce.com;Expires=Tue,
|
203
|
+
14-Jul-2015 01:18:29 GMT
|
151
204
|
Expires:
|
152
205
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
153
206
|
Sforce-Limit-Info:
|
154
|
-
- api-usage=
|
207
|
+
- api-usage=588/15000
|
155
208
|
body:
|
156
209
|
encoding: UTF-8
|
157
210
|
string: ''
|
158
211
|
http_version:
|
159
|
-
recorded_at:
|
212
|
+
recorded_at: Fri, 15 May 2015 01:18:29 GMT
|
160
213
|
- request:
|
161
214
|
method: get
|
162
|
-
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%
|
215
|
+
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001ZoCTAA0%27
|
163
216
|
body:
|
164
217
|
encoding: US-ASCII
|
165
218
|
string: ''
|
@@ -167,7 +220,7 @@ http_interactions:
|
|
167
220
|
User-Agent:
|
168
221
|
- Faraday v0.9.1
|
169
222
|
Authorization:
|
170
|
-
- OAuth 00D1a000000H3O9!
|
223
|
+
- OAuth 00D1a000000H3O9!AQ4AQOOuLg_qT_KH0d7e0MZl9eLqLOVkelXCvogl6uoC11zAr2MxSfN.Kp.FGeGl6RwwgcLORuGYbL2Rk2tznb5e22BOVEcb
|
171
224
|
Accept-Encoding:
|
172
225
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
173
226
|
Accept:
|
@@ -178,27 +231,27 @@ http_interactions:
|
|
178
231
|
message: OK
|
179
232
|
headers:
|
180
233
|
Date:
|
181
|
-
-
|
234
|
+
- Fri, 15 May 2015 01:18:30 GMT
|
182
235
|
Set-Cookie:
|
183
|
-
- BrowserId=
|
184
|
-
|
236
|
+
- BrowserId=s_oRgwrPSia56IwXQo01xQ;Path=/;Domain=.salesforce.com;Expires=Tue,
|
237
|
+
14-Jul-2015 01:18:30 GMT
|
185
238
|
Expires:
|
186
239
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
187
240
|
Sforce-Limit-Info:
|
188
|
-
- api-usage=
|
241
|
+
- api-usage=591/15000
|
189
242
|
Content-Type:
|
190
243
|
- application/json;charset=UTF-8
|
191
244
|
Transfer-Encoding:
|
192
245
|
- chunked
|
193
246
|
body:
|
194
247
|
encoding: ASCII-8BIT
|
195
|
-
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/
|
248
|
+
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001ZoCTAA0"},"Id":"a001a000001ZoCTAA0","SystemModstamp":"2015-05-15T01:18:29.000+0000","Name":"Some
|
196
249
|
new name","Example_Field__c":"New sample text"}]}'
|
197
250
|
http_version:
|
198
|
-
recorded_at:
|
251
|
+
recorded_at: Fri, 15 May 2015 01:18:30 GMT
|
199
252
|
- request:
|
200
253
|
method: delete
|
201
|
-
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/
|
254
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001ZoCTAA0
|
202
255
|
body:
|
203
256
|
encoding: US-ASCII
|
204
257
|
string: ''
|
@@ -206,7 +259,7 @@ http_interactions:
|
|
206
259
|
User-Agent:
|
207
260
|
- Faraday v0.9.1
|
208
261
|
Authorization:
|
209
|
-
- OAuth 00D1a000000H3O9!
|
262
|
+
- OAuth 00D1a000000H3O9!AQ4AQOOuLg_qT_KH0d7e0MZl9eLqLOVkelXCvogl6uoC11zAr2MxSfN.Kp.FGeGl6RwwgcLORuGYbL2Rk2tznb5e22BOVEcb
|
210
263
|
Accept-Encoding:
|
211
264
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
212
265
|
Accept:
|
@@ -217,17 +270,17 @@ http_interactions:
|
|
217
270
|
message: No Content
|
218
271
|
headers:
|
219
272
|
Date:
|
220
|
-
-
|
273
|
+
- Fri, 15 May 2015 01:18:32 GMT
|
221
274
|
Set-Cookie:
|
222
|
-
- BrowserId=
|
223
|
-
|
275
|
+
- BrowserId=rjBi2DCoSqSoM2K09UCWag;Path=/;Domain=.salesforce.com;Expires=Tue,
|
276
|
+
14-Jul-2015 01:18:32 GMT
|
224
277
|
Expires:
|
225
278
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
226
279
|
Sforce-Limit-Info:
|
227
|
-
- api-usage=
|
280
|
+
- api-usage=598/15000
|
228
281
|
body:
|
229
282
|
encoding: UTF-8
|
230
283
|
string: ''
|
231
284
|
http_version:
|
232
|
-
recorded_at:
|
285
|
+
recorded_at: Fri, 15 May 2015 01:18:32 GMT
|
233
286
|
recorded_with: VCR 2.9.3
|
@@ -80,4 +80,20 @@ describe Restforce::DB::Accumulator do
|
|
80
80
|
)
|
81
81
|
end
|
82
82
|
end
|
83
|
+
|
84
|
+
describe "#changed?" do
|
85
|
+
let(:attributes) { { wocket: "Pocket", jertain: "Curtain", zelf: "Shelf" } }
|
86
|
+
|
87
|
+
before do
|
88
|
+
accumulator.store(Time.now, attributes)
|
89
|
+
end
|
90
|
+
|
91
|
+
it "returns true if there are changes in the passed attributes hash" do
|
92
|
+
expect(accumulator).to_be :changed?, wocket: "Locket", zelf: "Shelf"
|
93
|
+
end
|
94
|
+
|
95
|
+
it "ignores attributes not set in both the Accumulator and the passed Hash" do
|
96
|
+
expect(accumulator).to_not_be :changed?, yottle: "Bottle"
|
97
|
+
end
|
98
|
+
end
|
83
99
|
end
|
@@ -10,24 +10,30 @@ describe Restforce::DB::Cleaner do
|
|
10
10
|
describe "#run", vcr: { match_requests_on: [:method, VCR.request_matchers.uri_without_param(:q)] } do
|
11
11
|
let(:attributes) do
|
12
12
|
{
|
13
|
-
|
14
|
-
|
13
|
+
"Name" => "Are you going to Scarborough Fair?",
|
14
|
+
"Example_Field__c" => "Parsley, Sage, Rosemary, and Thyme.",
|
15
15
|
}
|
16
16
|
end
|
17
|
-
let(:salesforce_id)
|
18
|
-
Salesforce.create!(
|
19
|
-
salesforce_model,
|
20
|
-
mapping.convert(salesforce_model, attributes),
|
21
|
-
)
|
22
|
-
end
|
17
|
+
let(:salesforce_id) { Salesforce.create!(salesforce_model, attributes) }
|
23
18
|
|
24
19
|
describe "given a synchronized Salesforce record" do
|
25
20
|
before do
|
26
21
|
database_model.create!(salesforce_id: salesforce_id)
|
27
22
|
end
|
28
23
|
|
24
|
+
describe "when the mapping has no conditions" do
|
25
|
+
before do
|
26
|
+
cleaner.run
|
27
|
+
end
|
28
|
+
|
29
|
+
it "does not drop the synchronized database record" do
|
30
|
+
expect(database_model.last).to_not_be_nil
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
29
34
|
describe "when the record meets the mapping conditions" do
|
30
35
|
before do
|
36
|
+
mapping.conditions = ["Name = '#{attributes['Name']}'"]
|
31
37
|
cleaner.run
|
32
38
|
end
|
33
39
|
|
@@ -38,7 +44,7 @@ describe Restforce::DB::Cleaner do
|
|
38
44
|
|
39
45
|
describe "when the record does not meet the mapping conditions" do
|
40
46
|
before do
|
41
|
-
mapping.conditions = ["Name != '#{attributes[
|
47
|
+
mapping.conditions = ["Name != '#{attributes['Name']}'"]
|
42
48
|
end
|
43
49
|
|
44
50
|
describe "for a non-Passive strategy" do
|
@@ -10,16 +10,11 @@ describe Restforce::DB::Collector do
|
|
10
10
|
describe "#run", vcr: { match_requests_on: [:method, VCR.request_matchers.uri_without_param(:q)] } do
|
11
11
|
let(:attributes) do
|
12
12
|
{
|
13
|
-
|
14
|
-
|
13
|
+
"Name" => "Custom object",
|
14
|
+
"Example_Field__c" => "Some sample text",
|
15
15
|
}
|
16
16
|
end
|
17
|
-
let(:salesforce_id)
|
18
|
-
Salesforce.create!(
|
19
|
-
salesforce_model,
|
20
|
-
mapping.convert(salesforce_model, attributes),
|
21
|
-
)
|
22
|
-
end
|
17
|
+
let(:salesforce_id) { Salesforce.create!(salesforce_model, attributes) }
|
23
18
|
let(:key) { [salesforce_id, salesforce_model] }
|
24
19
|
|
25
20
|
subject { collector.run }
|
@@ -32,8 +27,8 @@ describe Restforce::DB::Collector do
|
|
32
27
|
|
33
28
|
expect(subject[key]).to_equal(
|
34
29
|
record.last_update => {
|
35
|
-
"Name" => attributes[
|
36
|
-
"Example_Field__c" => attributes[
|
30
|
+
"Name" => attributes["Name"],
|
31
|
+
"Example_Field__c" => attributes["Example_Field__c"],
|
37
32
|
},
|
38
33
|
)
|
39
34
|
end
|
@@ -42,7 +37,10 @@ describe Restforce::DB::Collector do
|
|
42
37
|
describe "given an existing database record" do
|
43
38
|
let(:salesforce_id) { "a001a000001E1vREAL" }
|
44
39
|
let(:database_metadata) { { salesforce_id: salesforce_id, synchronized_at: Time.now } }
|
45
|
-
let(:database_record)
|
40
|
+
let(:database_record) do
|
41
|
+
database_attributes = mapping.convert(database_model, attributes)
|
42
|
+
database_model.create!(database_attributes.merge(database_metadata))
|
43
|
+
end
|
46
44
|
|
47
45
|
before { database_record }
|
48
46
|
|
@@ -51,8 +49,8 @@ describe Restforce::DB::Collector do
|
|
51
49
|
|
52
50
|
expect(subject[key]).to_equal(
|
53
51
|
record.last_update => {
|
54
|
-
"Name" => attributes[
|
55
|
-
"Example_Field__c" => attributes[
|
52
|
+
"Name" => attributes["Name"],
|
53
|
+
"Example_Field__c" => attributes["Example_Field__c"],
|
56
54
|
},
|
57
55
|
)
|
58
56
|
end
|
@@ -76,8 +74,8 @@ describe Restforce::DB::Collector do
|
|
76
74
|
|
77
75
|
expect(subject[key]).to_equal(
|
78
76
|
sf_record.last_update => {
|
79
|
-
"Name" => attributes[
|
80
|
-
"Example_Field__c" => attributes[
|
77
|
+
"Name" => attributes["Name"],
|
78
|
+
"Example_Field__c" => attributes["Example_Field__c"],
|
81
79
|
},
|
82
80
|
db_record.last_update => {
|
83
81
|
"Name" => database_attributes[:name],
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require_relative "../../../test_helper"
|
2
|
+
|
3
|
+
describe Restforce::DB::FieldProcessor do
|
4
|
+
|
5
|
+
configure!
|
6
|
+
|
7
|
+
let(:processor) { Restforce::DB::FieldProcessor.new }
|
8
|
+
|
9
|
+
describe "#process" do
|
10
|
+
let(:attributes) do
|
11
|
+
{
|
12
|
+
"Name" => "This field can be updated.",
|
13
|
+
"Id" => "But... but... this field is read-only!",
|
14
|
+
}
|
15
|
+
end
|
16
|
+
let(:dummy_client) do
|
17
|
+
Object.new.tap do |client|
|
18
|
+
|
19
|
+
def client.describe(_)
|
20
|
+
raise "This has already been invoked!" if @already_run
|
21
|
+
@already_run = true
|
22
|
+
|
23
|
+
Struct.new(:fields).new([
|
24
|
+
{ "name" => "Name", "updateable" => true },
|
25
|
+
{ "name" => "Id", "updateable" => false },
|
26
|
+
])
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
it "removes the read-only fields from the passed attribute Hash" do
|
33
|
+
Restforce::DB.stub(:client, dummy_client) do
|
34
|
+
expect(processor.process("CustomObject__c", attributes)).to_equal(
|
35
|
+
"Name" => attributes["Name"],
|
36
|
+
)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
it "invokes the client only once for a single SObject Type" do
|
41
|
+
Restforce::DB.stub(:client, dummy_client) do
|
42
|
+
processor.process("CustomObject__c", attributes)
|
43
|
+
|
44
|
+
# Our dummy client is configured to raise an error if `#describe` is
|
45
|
+
# invoked more than once. There is no "wont_raise" in Minitest.
|
46
|
+
processor.process("CustomObject__c", attributes)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -10,16 +10,11 @@ describe Restforce::DB::Initializer do
|
|
10
10
|
describe "#run", vcr: { match_requests_on: [:method, VCR.request_matchers.uri_without_param(:q)] } do
|
11
11
|
let(:attributes) do
|
12
12
|
{
|
13
|
-
|
14
|
-
|
13
|
+
"Name" => "Custom object",
|
14
|
+
"Example_Field__c" => "Some sample text",
|
15
15
|
}
|
16
16
|
end
|
17
|
-
let(:salesforce_id)
|
18
|
-
Salesforce.create!(
|
19
|
-
salesforce_model,
|
20
|
-
mapping.convert(salesforce_model, attributes),
|
21
|
-
)
|
22
|
-
end
|
17
|
+
let(:salesforce_id) { Salesforce.create!(salesforce_model, attributes) }
|
23
18
|
|
24
19
|
describe "given an existing Salesforce record" do
|
25
20
|
before do
|
@@ -35,8 +30,8 @@ describe Restforce::DB::Initializer do
|
|
35
30
|
it "creates a matching database record" do
|
36
31
|
record = database_model.last
|
37
32
|
|
38
|
-
expect(record.name).to_equal attributes[
|
39
|
-
expect(record.example).to_equal attributes[
|
33
|
+
expect(record.name).to_equal attributes["Name"]
|
34
|
+
expect(record.example).to_equal attributes["Example_Field__c"]
|
40
35
|
expect(record.salesforce_id).to_equal salesforce_id
|
41
36
|
end
|
42
37
|
end
|
@@ -54,7 +49,9 @@ describe Restforce::DB::Initializer do
|
|
54
49
|
end
|
55
50
|
|
56
51
|
describe "given an existing database record" do
|
57
|
-
let(:database_record)
|
52
|
+
let(:database_record) do
|
53
|
+
database_model.create!(mapping.convert(database_model, attributes))
|
54
|
+
end
|
58
55
|
let(:salesforce_id) { database_record.reload.salesforce_id }
|
59
56
|
|
60
57
|
before do
|
@@ -71,8 +68,8 @@ describe Restforce::DB::Initializer do
|
|
71
68
|
it "populates Salesforce with the new record" do
|
72
69
|
record = mapping.salesforce_record_type.find(salesforce_id).record
|
73
70
|
|
74
|
-
expect(record.Name).to_equal attributes[
|
75
|
-
expect(record.Example_Field__c).to_equal attributes[
|
71
|
+
expect(record.Name).to_equal attributes["Name"]
|
72
|
+
expect(record.Example_Field__c).to_equal attributes["Example_Field__c"]
|
76
73
|
end
|
77
74
|
end
|
78
75
|
|
data/test/support/utilities.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restforce-db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Horner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -223,6 +223,7 @@ files:
|
|
223
223
|
- lib/restforce/db/command.rb
|
224
224
|
- lib/restforce/db/configuration.rb
|
225
225
|
- lib/restforce/db/dsl.rb
|
226
|
+
- lib/restforce/db/field_processor.rb
|
226
227
|
- lib/restforce/db/initializer.rb
|
227
228
|
- lib/restforce/db/instances/active_record.rb
|
228
229
|
- lib/restforce/db/instances/base.rb
|
@@ -275,6 +276,7 @@ files:
|
|
275
276
|
- test/cassettes/Restforce_DB_Associations_HasOne/with_an_inverse_mapping/_synced_for_/when_no_matching_associated_record_has_been_synchronized/returns_false.yml
|
276
277
|
- test/cassettes/Restforce_DB_Associator/_run/given_a_BelongsTo_association/given_another_record_for_association/when_the_Salesforce_association_is_out_of_date/updates_the_association_ID_in_Salesforce.yml
|
277
278
|
- test/cassettes/Restforce_DB_Associator/_run/given_a_BelongsTo_association/given_another_record_for_association/when_the_database_association_is_out_of_date/updates_the_associated_record_in_the_database.yml
|
279
|
+
- test/cassettes/Restforce_DB_Cleaner/_run/given_a_synchronized_Salesforce_record/when_the_mapping_has_no_conditions/does_not_drop_the_synchronized_database_record.yml
|
278
280
|
- test/cassettes/Restforce_DB_Cleaner/_run/given_a_synchronized_Salesforce_record/when_the_record_does_not_meet_the_mapping_conditions/for_a_non-Passive_strategy/drops_the_synchronized_database_record.yml
|
279
281
|
- test/cassettes/Restforce_DB_Cleaner/_run/given_a_synchronized_Salesforce_record/when_the_record_meets_the_mapping_conditions/does_not_drop_the_synchronized_database_record.yml
|
280
282
|
- test/cassettes/Restforce_DB_Collector/_run/given_a_Salesforce_record_with_an_associated_database_record/returns_the_attributes_from_both_records.yml
|
@@ -283,7 +285,6 @@ files:
|
|
283
285
|
- test/cassettes/Restforce_DB_Initializer/_run/given_an_existing_Salesforce_record/for_a_Passive_strategy/does_not_create_a_database_record.yml
|
284
286
|
- test/cassettes/Restforce_DB_Initializer/_run/given_an_existing_Salesforce_record/for_an_Always_strategy/creates_a_matching_database_record.yml
|
285
287
|
- test/cassettes/Restforce_DB_Initializer/_run/given_an_existing_database_record/for_an_Always_strategy/populates_Salesforce_with_the_new_record.yml
|
286
|
-
- test/cassettes/Restforce_DB_Instances_Salesforce/_copy_/updates_the_record_with_the_attributes_from_the_copied_object.yml
|
287
288
|
- test/cassettes/Restforce_DB_Instances_Salesforce/_synced_/when_a_matching_database_record_exists/returns_true.yml
|
288
289
|
- test/cassettes/Restforce_DB_Instances_Salesforce/_synced_/when_no_matching_database_record_exists/returns_false.yml
|
289
290
|
- test/cassettes/Restforce_DB_Instances_Salesforce/_update_/updates_the_local_record_with_the_passed_attributes.yml
|
@@ -315,6 +316,7 @@ files:
|
|
315
316
|
- test/lib/restforce/db/collector_test.rb
|
316
317
|
- test/lib/restforce/db/configuration_test.rb
|
317
318
|
- test/lib/restforce/db/dsl_test.rb
|
319
|
+
- test/lib/restforce/db/field_processor_test.rb
|
318
320
|
- test/lib/restforce/db/initializer_test.rb
|
319
321
|
- test/lib/restforce/db/instances/active_record_test.rb
|
320
322
|
- test/lib/restforce/db/instances/salesforce_test.rb
|