contactology 0.1.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +16 -2
- data/.rspec +0 -1
- data/.rvmrc +34 -23
- data/.travis.yml +9 -3
- data/CHANGELOG.markdown +46 -0
- data/Gemfile +0 -7
- data/README.markdown +5 -3
- data/contactology.gemspec +10 -10
- data/lib/contactology/version.rb +1 -1
- data/spec/cassettes/campaign/destroy.yml +293 -0
- data/spec/cassettes/campaign/find/failure.yml +45 -0
- data/spec/cassettes/campaign/find/success.yml +252 -0
- data/spec/cassettes/campaign/find_by_name/failure.yml +44 -0
- data/spec/cassettes/campaign/find_by_name/success.yml +252 -0
- data/spec/cassettes/campaign/preview.yml +135 -0
- data/spec/cassettes/campaigns/standard/create/failure.yml +127 -0
- data/spec/cassettes/campaigns/standard/create/invalid.yml +169 -0
- data/spec/cassettes/campaigns/standard/create/success.yml +209 -0
- data/spec/cassettes/campaigns/standard/send_campaign/failure.yml +374 -0
- data/spec/cassettes/campaigns/standard/send_campaign/failure_missing_attributes.yml +373 -0
- data/spec/cassettes/campaigns/standard/send_campaign/success.yml +374 -0
- data/spec/cassettes/campaigns/transactional/create/failure.yml +44 -0
- data/spec/cassettes/campaigns/transactional/create/success.yml +85 -0
- data/spec/cassettes/campaigns/transactional/send_campaign/failure.yml +127 -0
- data/spec/cassettes/campaigns/transactional/send_campaign/success.yml +208 -0
- data/spec/cassettes/contact/active.yml +127 -0
- data/spec/cassettes/contact/change_email/success.yml +210 -0
- data/spec/cassettes/contact/change_email/unknown.yml +45 -0
- data/spec/cassettes/contact/create.yml +127 -0
- data/spec/cassettes/contact/destroy.yml +85 -0
- data/spec/cassettes/contact/find/active.yml +127 -0
- data/spec/cassettes/contact/find/suppressed.yml +168 -0
- data/spec/cassettes/contact/find/unknown.yml +44 -0
- data/spec/cassettes/contact/lists/empty.yml +126 -0
- data/spec/cassettes/contact/lists/full.yml +333 -0
- data/spec/cassettes/contact/lists/unknown.yml +86 -0
- data/spec/cassettes/contact/suppress.yml +168 -0
- data/spec/cassettes/list/all.yml +168 -0
- data/spec/cassettes/list/create.yml +127 -0
- data/spec/cassettes/list/destroy.yml +210 -0
- data/spec/cassettes/list/find/success.yml +169 -0
- data/spec/cassettes/list/find/unknown.yml +45 -0
- data/spec/cassettes/list/import/success.yml +251 -0
- data/spec/cassettes/list/subscribe/success.yml +250 -0
- data/spec/cassettes/list/unsubscribe/success.yml +291 -0
- data/spec/cassettes/transactional_message/send_message/failure.yml +209 -0
- data/spec/cassettes/transactional_message/send_message/success.yml +208 -0
- data/spec/factories/campaigns.rb +18 -16
- data/spec/factories/contacts.rb +6 -2
- data/spec/factories/issues.rb +12 -8
- data/spec/factories/lists.rb +6 -2
- data/spec/factories/transactional_messages.rb +8 -4
- data/spec/models/contactology/campaign_spec.rb +16 -22
- data/spec/models/contactology/campaigns/standard_spec.rb +31 -27
- data/spec/models/contactology/campaigns/transactional_spec.rb +26 -16
- data/spec/models/contactology/contact_spec.rb +28 -35
- data/spec/models/contactology/issues_spec.rb +2 -2
- data/spec/models/contactology/list_spec.rb +12 -20
- data/spec/models/contactology/transactional_message_spec.rb +13 -15
- data/spec/spec_helper.rb +9 -5
- data/spec/support/factory_girl.rb +4 -18
- data/spec/support/vcr.rb +9 -6
- metadata +208 -177
- data/.infinity_test +0 -16
- data/.watchr +0 -36
- data/Changelog.markdown +0 -30
- data/spec/fixtures/net/campaign/destroy.yml +0 -248
- data/spec/fixtures/net/campaign/find/failure.yml +0 -36
- data/spec/fixtures/net/campaign/find/success.yml +0 -283
- data/spec/fixtures/net/campaign/find_by_name/failure.yml +0 -36
- data/spec/fixtures/net/campaign/find_by_name/success.yml +0 -283
- data/spec/fixtures/net/campaign/preview.yml +0 -181
- data/spec/fixtures/net/campaigns/standard/create/failure.yml +0 -106
- data/spec/fixtures/net/campaigns/standard/create/invalid.yml +0 -141
- data/spec/fixtures/net/campaigns/standard/create/success.yml +0 -176
- data/spec/fixtures/net/campaigns/standard/send_campaign/failure.yml +0 -316
- data/spec/fixtures/net/campaigns/standard/send_campaign/failure_missing_attributes.yml +0 -316
- data/spec/fixtures/net/campaigns/standard/send_campaign/success.yml +0 -316
- data/spec/fixtures/net/campaigns/transactional/create/failure.yml +0 -36
- data/spec/fixtures/net/campaigns/transactional/create/success.yml +0 -71
- data/spec/fixtures/net/campaigns/transactional/send_campaign/failure.yml +0 -106
- data/spec/fixtures/net/campaigns/transactional/send_campaign/success.yml +0 -176
- data/spec/fixtures/net/contact/active.yml +0 -106
- data/spec/fixtures/net/contact/change_email/success.yml +0 -176
- data/spec/fixtures/net/contact/change_email/unknown.yml +0 -36
- data/spec/fixtures/net/contact/create.yml +0 -106
- data/spec/fixtures/net/contact/destroy.yml +0 -141
- data/spec/fixtures/net/contact/find/active.yml +0 -106
- data/spec/fixtures/net/contact/find/suppressed.yml +0 -141
- data/spec/fixtures/net/contact/find/unknown.yml +0 -36
- data/spec/fixtures/net/contact/lists/empty.yml +0 -106
- data/spec/fixtures/net/contact/lists/full.yml +0 -246
- data/spec/fixtures/net/contact/lists/unknown.yml +0 -71
- data/spec/fixtures/net/contact/suppress.yml +0 -141
- data/spec/fixtures/net/list/all.yml +0 -141
- data/spec/fixtures/net/list/create.yml +0 -106
- data/spec/fixtures/net/list/destroy.yml +0 -176
- data/spec/fixtures/net/list/find/success.yml +0 -141
- data/spec/fixtures/net/list/find/unknown.yml +0 -36
- data/spec/fixtures/net/list/import/success.yml +0 -351
- data/spec/fixtures/net/list/subscribe/success.yml +0 -211
- data/spec/fixtures/net/list/unsubscribe/success.yml +0 -246
- data/spec/fixtures/net/transactional_message/send_message/failure.yml +0 -176
- data/spec/fixtures/net/transactional_message/send_message/success.yml +0 -176
- data/spec/requests/contacts_spec.rb +0 -6
@@ -0,0 +1,209 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.emailcampaigns.net/2/REST/?campaignName=factory%20campaign&content%5Btext%5D=This%20is%20a%20good%20message!%20%7BCOMPANY_ADDRESS%7D&key=%{API_KEY}&method=Campaign_Create_Transactional&senderEmail=sender@example.com&senderName=Sender%20Example&subject=Factory%20Campaign%20Message&testContact%5Bemail%5D=test-contact@example.com&testReplacements%5Bfirst_name%5D=John
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
X-Powered-By:
|
20
|
+
- PHP/5.2.10
|
21
|
+
Set-Cookie:
|
22
|
+
- PHPSESSID=888e25aa21460b8ba3c2fb1a23221aef; path=/
|
23
|
+
Expires:
|
24
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
25
|
+
Cache-Control:
|
26
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
27
|
+
Pragma:
|
28
|
+
- no-cache
|
29
|
+
Content-Type:
|
30
|
+
- text/plain;charset=UTF-8
|
31
|
+
Connection:
|
32
|
+
- close
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
Date:
|
36
|
+
- Wed, 20 Feb 2013 05:16:43 GMT
|
37
|
+
Server:
|
38
|
+
- lighttpd/1.4.28
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: '113'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Wed, 20 Feb 2013 05:16:44 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://api.emailcampaigns.net/2/REST/?campaignId=113&key=%{API_KEY}&method=Campaign_Delete
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
Accept:
|
52
|
+
- application/json
|
53
|
+
User-Agent:
|
54
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 200
|
58
|
+
message: OK
|
59
|
+
headers:
|
60
|
+
X-Powered-By:
|
61
|
+
- PHP/5.2.10
|
62
|
+
Set-Cookie:
|
63
|
+
- PHPSESSID=4cde875d1957d22dfb68cb078a7cca79; path=/
|
64
|
+
Expires:
|
65
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
66
|
+
Cache-Control:
|
67
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
68
|
+
Pragma:
|
69
|
+
- no-cache
|
70
|
+
Content-Type:
|
71
|
+
- text/plain;charset=UTF-8
|
72
|
+
Connection:
|
73
|
+
- close
|
74
|
+
Transfer-Encoding:
|
75
|
+
- chunked
|
76
|
+
Date:
|
77
|
+
- Wed, 20 Feb 2013 05:16:44 GMT
|
78
|
+
Server:
|
79
|
+
- lighttpd/1.4.28
|
80
|
+
body:
|
81
|
+
encoding: US-ASCII
|
82
|
+
string: 'true'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Wed, 20 Feb 2013 05:16:44 GMT
|
85
|
+
- request:
|
86
|
+
method: get
|
87
|
+
uri: https://api.emailcampaigns.net/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&method=Contact_Add&optionalParameters%5BupdateCustomFields%5D=true
|
88
|
+
body:
|
89
|
+
encoding: US-ASCII
|
90
|
+
string: ''
|
91
|
+
headers:
|
92
|
+
Accept:
|
93
|
+
- application/json
|
94
|
+
User-Agent:
|
95
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
96
|
+
response:
|
97
|
+
status:
|
98
|
+
code: 200
|
99
|
+
message: OK
|
100
|
+
headers:
|
101
|
+
X-Powered-By:
|
102
|
+
- PHP/5.2.10
|
103
|
+
Set-Cookie:
|
104
|
+
- PHPSESSID=130ab2130b1a8e6898da27b09053e3b8; path=/
|
105
|
+
Expires:
|
106
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
107
|
+
Cache-Control:
|
108
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
109
|
+
Pragma:
|
110
|
+
- no-cache
|
111
|
+
Content-Type:
|
112
|
+
- text/plain;charset=UTF-8
|
113
|
+
Connection:
|
114
|
+
- close
|
115
|
+
Transfer-Encoding:
|
116
|
+
- chunked
|
117
|
+
Date:
|
118
|
+
- Wed, 20 Feb 2013 05:16:44 GMT
|
119
|
+
Server:
|
120
|
+
- lighttpd/1.4.28
|
121
|
+
body:
|
122
|
+
encoding: US-ASCII
|
123
|
+
string: 'true'
|
124
|
+
http_version:
|
125
|
+
recorded_at: Wed, 20 Feb 2013 05:16:44 GMT
|
126
|
+
- request:
|
127
|
+
method: get
|
128
|
+
uri: https://api.emailcampaigns.net/2/REST/?campaignId=113&contact%5Bemail%5D=factory-contact@example.com&contact%5Bstatus%5D=active&key=%{API_KEY}&method=Campaign_Send_Transactional&replacements%5B_contactology%5D=Contactology&source=Factory%20Created
|
129
|
+
body:
|
130
|
+
encoding: US-ASCII
|
131
|
+
string: ''
|
132
|
+
headers:
|
133
|
+
Accept:
|
134
|
+
- application/json
|
135
|
+
User-Agent:
|
136
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
137
|
+
response:
|
138
|
+
status:
|
139
|
+
code: 200
|
140
|
+
message: OK
|
141
|
+
headers:
|
142
|
+
X-Powered-By:
|
143
|
+
- PHP/5.2.10
|
144
|
+
Set-Cookie:
|
145
|
+
- PHPSESSID=54a15750932612bd31f92ccc189b46cf; path=/
|
146
|
+
Expires:
|
147
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
148
|
+
Cache-Control:
|
149
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
150
|
+
Pragma:
|
151
|
+
- no-cache
|
152
|
+
Content-Type:
|
153
|
+
- text/plain;charset=UTF-8
|
154
|
+
Connection:
|
155
|
+
- close
|
156
|
+
Transfer-Encoding:
|
157
|
+
- chunked
|
158
|
+
Date:
|
159
|
+
- Wed, 20 Feb 2013 05:16:45 GMT
|
160
|
+
Server:
|
161
|
+
- lighttpd/1.4.28
|
162
|
+
body:
|
163
|
+
encoding: US-ASCII
|
164
|
+
string: ! '{"result":"error","message":"Input Error: Campaign 113 has the wrong
|
165
|
+
status","code":601}'
|
166
|
+
http_version:
|
167
|
+
recorded_at: Wed, 20 Feb 2013 05:16:45 GMT
|
168
|
+
- request:
|
169
|
+
method: get
|
170
|
+
uri: https://api.emailcampaigns.net/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&method=Contact_Delete
|
171
|
+
body:
|
172
|
+
encoding: US-ASCII
|
173
|
+
string: ''
|
174
|
+
headers:
|
175
|
+
Accept:
|
176
|
+
- application/json
|
177
|
+
User-Agent:
|
178
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
179
|
+
response:
|
180
|
+
status:
|
181
|
+
code: 200
|
182
|
+
message: OK
|
183
|
+
headers:
|
184
|
+
X-Powered-By:
|
185
|
+
- PHP/5.2.10
|
186
|
+
Set-Cookie:
|
187
|
+
- PHPSESSID=ed2387c9e653f52980e28cf2e9481c08; path=/
|
188
|
+
Expires:
|
189
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
190
|
+
Cache-Control:
|
191
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
192
|
+
Pragma:
|
193
|
+
- no-cache
|
194
|
+
Content-Type:
|
195
|
+
- text/plain;charset=UTF-8
|
196
|
+
Connection:
|
197
|
+
- close
|
198
|
+
Transfer-Encoding:
|
199
|
+
- chunked
|
200
|
+
Date:
|
201
|
+
- Wed, 20 Feb 2013 05:16:45 GMT
|
202
|
+
Server:
|
203
|
+
- lighttpd/1.4.28
|
204
|
+
body:
|
205
|
+
encoding: US-ASCII
|
206
|
+
string: 'true'
|
207
|
+
http_version:
|
208
|
+
recorded_at: Wed, 20 Feb 2013 05:16:45 GMT
|
209
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,208 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.emailcampaigns.net/2/REST/?campaignName=factory%20campaign&content%5Btext%5D=This%20is%20a%20good%20message!%20%7BCOMPANY_ADDRESS%7D&key=%{API_KEY}&method=Campaign_Create_Transactional&senderEmail=sender@example.com&senderName=Sender%20Example&subject=Factory%20Campaign%20Message&testContact%5Bemail%5D=test-contact@example.com&testReplacements%5Bfirst_name%5D=John
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
X-Powered-By:
|
20
|
+
- PHP/5.2.10
|
21
|
+
Set-Cookie:
|
22
|
+
- PHPSESSID=24729f58dc62132de9958a16dedfbcef; path=/
|
23
|
+
Expires:
|
24
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
25
|
+
Cache-Control:
|
26
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
27
|
+
Pragma:
|
28
|
+
- no-cache
|
29
|
+
Content-Type:
|
30
|
+
- text/plain;charset=UTF-8
|
31
|
+
Connection:
|
32
|
+
- close
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
Date:
|
36
|
+
- Wed, 20 Feb 2013 05:16:52 GMT
|
37
|
+
Server:
|
38
|
+
- lighttpd/1.4.28
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: '115'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Wed, 20 Feb 2013 05:16:52 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://api.emailcampaigns.net/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&method=Contact_Add&optionalParameters%5BupdateCustomFields%5D=true
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
Accept:
|
52
|
+
- application/json
|
53
|
+
User-Agent:
|
54
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 200
|
58
|
+
message: OK
|
59
|
+
headers:
|
60
|
+
X-Powered-By:
|
61
|
+
- PHP/5.2.10
|
62
|
+
Set-Cookie:
|
63
|
+
- PHPSESSID=dd2460f060f0e751ec71cb52f76dd767; path=/
|
64
|
+
Expires:
|
65
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
66
|
+
Cache-Control:
|
67
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
68
|
+
Pragma:
|
69
|
+
- no-cache
|
70
|
+
Content-Type:
|
71
|
+
- text/plain;charset=UTF-8
|
72
|
+
Connection:
|
73
|
+
- close
|
74
|
+
Transfer-Encoding:
|
75
|
+
- chunked
|
76
|
+
Date:
|
77
|
+
- Wed, 20 Feb 2013 05:16:52 GMT
|
78
|
+
Server:
|
79
|
+
- lighttpd/1.4.28
|
80
|
+
body:
|
81
|
+
encoding: US-ASCII
|
82
|
+
string: 'true'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Wed, 20 Feb 2013 05:16:52 GMT
|
85
|
+
- request:
|
86
|
+
method: get
|
87
|
+
uri: https://api.emailcampaigns.net/2/REST/?campaignId=115&contact%5Bemail%5D=factory-contact@example.com&contact%5Bstatus%5D=active&key=%{API_KEY}&method=Campaign_Send_Transactional&replacements%5B_contactology%5D=Contactology&source=Factory%20Created
|
88
|
+
body:
|
89
|
+
encoding: US-ASCII
|
90
|
+
string: ''
|
91
|
+
headers:
|
92
|
+
Accept:
|
93
|
+
- application/json
|
94
|
+
User-Agent:
|
95
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
96
|
+
response:
|
97
|
+
status:
|
98
|
+
code: 200
|
99
|
+
message: OK
|
100
|
+
headers:
|
101
|
+
X-Powered-By:
|
102
|
+
- PHP/5.2.10
|
103
|
+
Set-Cookie:
|
104
|
+
- PHPSESSID=9d73749905f76b0c182aad6169e74f0d; path=/
|
105
|
+
Expires:
|
106
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
107
|
+
Cache-Control:
|
108
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
109
|
+
Pragma:
|
110
|
+
- no-cache
|
111
|
+
Content-Type:
|
112
|
+
- text/plain;charset=UTF-8
|
113
|
+
Connection:
|
114
|
+
- close
|
115
|
+
Transfer-Encoding:
|
116
|
+
- chunked
|
117
|
+
Date:
|
118
|
+
- Wed, 20 Feb 2013 05:16:57 GMT
|
119
|
+
Server:
|
120
|
+
- lighttpd/1.4.28
|
121
|
+
body:
|
122
|
+
encoding: US-ASCII
|
123
|
+
string: 'true'
|
124
|
+
http_version:
|
125
|
+
recorded_at: Wed, 20 Feb 2013 05:16:57 GMT
|
126
|
+
- request:
|
127
|
+
method: get
|
128
|
+
uri: https://api.emailcampaigns.net/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&method=Contact_Delete
|
129
|
+
body:
|
130
|
+
encoding: US-ASCII
|
131
|
+
string: ''
|
132
|
+
headers:
|
133
|
+
Accept:
|
134
|
+
- application/json
|
135
|
+
User-Agent:
|
136
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
137
|
+
response:
|
138
|
+
status:
|
139
|
+
code: 200
|
140
|
+
message: OK
|
141
|
+
headers:
|
142
|
+
X-Powered-By:
|
143
|
+
- PHP/5.2.10
|
144
|
+
Set-Cookie:
|
145
|
+
- PHPSESSID=e8bf78688cb05ddd5a9d986045cd8033; path=/
|
146
|
+
Expires:
|
147
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
148
|
+
Cache-Control:
|
149
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
150
|
+
Pragma:
|
151
|
+
- no-cache
|
152
|
+
Content-Type:
|
153
|
+
- text/plain;charset=UTF-8
|
154
|
+
Connection:
|
155
|
+
- close
|
156
|
+
Transfer-Encoding:
|
157
|
+
- chunked
|
158
|
+
Date:
|
159
|
+
- Wed, 20 Feb 2013 05:16:58 GMT
|
160
|
+
Server:
|
161
|
+
- lighttpd/1.4.28
|
162
|
+
body:
|
163
|
+
encoding: US-ASCII
|
164
|
+
string: 'true'
|
165
|
+
http_version:
|
166
|
+
recorded_at: Wed, 20 Feb 2013 05:16:58 GMT
|
167
|
+
- request:
|
168
|
+
method: get
|
169
|
+
uri: https://api.emailcampaigns.net/2/REST/?campaignId=115&key=%{API_KEY}&method=Campaign_Delete
|
170
|
+
body:
|
171
|
+
encoding: US-ASCII
|
172
|
+
string: ''
|
173
|
+
headers:
|
174
|
+
Accept:
|
175
|
+
- application/json
|
176
|
+
User-Agent:
|
177
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
178
|
+
response:
|
179
|
+
status:
|
180
|
+
code: 200
|
181
|
+
message: OK
|
182
|
+
headers:
|
183
|
+
X-Powered-By:
|
184
|
+
- PHP/5.2.10
|
185
|
+
Set-Cookie:
|
186
|
+
- PHPSESSID=adeb83d37646d6c6f41a4003da2771b8; path=/
|
187
|
+
Expires:
|
188
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
189
|
+
Cache-Control:
|
190
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
191
|
+
Pragma:
|
192
|
+
- no-cache
|
193
|
+
Content-Type:
|
194
|
+
- text/plain;charset=UTF-8
|
195
|
+
Connection:
|
196
|
+
- close
|
197
|
+
Transfer-Encoding:
|
198
|
+
- chunked
|
199
|
+
Date:
|
200
|
+
- Wed, 20 Feb 2013 05:16:58 GMT
|
201
|
+
Server:
|
202
|
+
- lighttpd/1.4.28
|
203
|
+
body:
|
204
|
+
encoding: US-ASCII
|
205
|
+
string: 'true'
|
206
|
+
http_version:
|
207
|
+
recorded_at: Wed, 20 Feb 2013 05:16:59 GMT
|
208
|
+
recorded_with: VCR 2.4.0
|
data/spec/factories/campaigns.rb
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
FactoryGirl.define do
|
4
|
+
factory :campaign, :class => Contactology::Campaigns::Standard do
|
5
|
+
name 'factory campaign'
|
6
|
+
content 'text' => 'This is a good message! {COMPANY_ADDRESS}'
|
7
|
+
sender_email 'sender@example.com'
|
8
|
+
sender_name 'Sender Example'
|
9
|
+
subject 'Factory Campaign Message'
|
10
|
+
|
11
|
+
initialize_with { new(attributes) }
|
12
|
+
|
13
|
+
factory :standard_campaign do
|
14
|
+
association :recipients, :factory => :list
|
15
|
+
end
|
11
16
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
c.subject 'Test Creation'
|
18
|
-
c.test_contact 'email' => 'test-contact@example.com'
|
19
|
-
c.test_replacements 'first_name' => 'John'
|
17
|
+
factory :transactional_campaign, :class => Contactology::Campaigns::Transactional do
|
18
|
+
test_contact 'email' => 'test-contact@example.com'
|
19
|
+
test_replacements 'first_name' => 'John'
|
20
|
+
end
|
21
|
+
end
|
20
22
|
end
|