11# coding=utf-8
22#
3- # Copyright 2012 keyes.ie
4- #
53# License: http://jkeyes.mit-license.org/
64#
75
@@ -87,10 +85,10 @@ def test_user(email="bob@example.com"):
8785 "type" : "social_profile.list" ,
8886 "social_profiles" : [
8987 {
90- "type" : "social_profile" ,
91- "name" : "twitter" ,
92- "url" : "http://twitter.com/abc" ,
93- "username" : "abc" ,
88+ "type" : "social_profile" ,
89+ "name" : "twitter" ,
90+ "url" : "http://twitter.com/abc" ,
91+ "username" : "abc" ,
9492 "id" : None
9593 },
9694 {
@@ -114,7 +112,7 @@ def test_user(email="bob@example.com"):
114112 "username" : "abc" ,
115113 "id" : "1234242"
116114 }
117- ]
115+ ]
118116 },
119117 "location_data" : {
120118 "type" : "location_data" ,
@@ -148,100 +146,13 @@ def page_of_users(include_next_link=False):
148146 page ["pages" ]["next" ] = "https://api.intercom.io/users?per_page=50&page=2"
149147 return page
150148
151-
152- # def test_messages
153- # [test_message, test_message]
154- # end
155-
156- # def test_message
157- # {
158- # "created_at" => 1329837506,
159- # "updated_at" => 1329664706,
160- # "read" => true,
161- # "created_by_user" => true,
162- # "thread_id" => 5591,
163- # "messages" => [
164- # {
165- # "created_at" => 1329837506,
166- # "html" => "<p>Hey Intercom, What is up?</p>\n",
167- # "from" => {
168- # "email" => "bob@example.com",
169- # "name" => "Bob",
170- # "user_id" => "123",
171- # "is_admin" => false
172- # }
173- # },
174- # {
175- # "created_at" => 1329664706,
176- # "rendered_body" => "<p>Not much, you?</p>\n",
177- # "from" => {
178- # "name" => "Super Duper Admin",
179- # "avatar" => {
180- # "square_25" => "https://static.intercomcdn.com/avatars/13347/square_25/Ruairi_Profile.png?1375368166",
181- # "square_50" => "https://static.intercomcdn.com/avatars/13347/square_50/Ruairi_Profile.png?1375368166",
182- # "square_128" => "https://static.intercomcdn.com/avatars/13347/square_128/Ruairi_Profile.png?1375368166"
183- # },
184- # "is_admin" => true
185- # }
186- # },
187- # {
188- # "created_at" => 1329664806,
189- # "rendered_body" => "<p>Not much either :(</p>\n",
190- # "from" => {
191- # "email" => "bob@example.com",
192- # "name" => "Bob",
193- # "user_id" => "123",
194- # "is_admin" => false
195- # }
196- # }
197- # ]
198- # }
199- # end
200-
201- # def page_of_users(include_next_link: false)
202- # all_user =
203- # {
204- # "type"=>"user.list",
205- # "pages"=>
206- # {
207- # "type"=>"pages",
208- # "next"=> (include_next_link ? "https://api.intercom.io/users?per_page=50&page=2" : nil),
209- # "page"=>1,
210- # "per_page"=>50,
211- # "total_pages"=>7
212- # },
213- # "users"=> [test_user("user1@example.com"), test_user("user2@example.com"), test_user("user3@example.com")],
214- # "total_count"=>314
215- # }
216- # end
217-
218149test_tag = {
219150 "id" : "4f73428b5e4dfc000b000112" ,
220151 "name" : "Test Tag" ,
221152 "segment" : False ,
222153 "tagged_user_count" : 2
223154}
224155
225-
226- # def error_on_modify_frozen
227- # RUBY_VERSION =~ /1.8/ ? TypeError : RuntimeError
228- # end
229-
230- # def capture_exception(&block)
231- # begin
232- # block.call
233- # rescue => e
234- # return e
235- # end
236- # end
237-
238- # def unshuffleable_array(array)
239- # def array.shuffle
240- # self
241- # end
242- # array
243- # end
244-
245156test_subscription = {
246157 "type" : "notification_subscription" ,
247158 "id" : "nsub_123456789" ,
0 commit comments