Skip to content

Commit c4516af

Browse files
committed
Merge pull request #58 from intercom/fake-web-for-integration-tests
use fake-web rather than relying on soon to be retired dummy mode in rea...
2 parents a8c8ee5 + 57a2e2d commit c4516af

File tree

8 files changed

+354
-4
lines changed

8 files changed

+354
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ pkg/*
88
.yardoc
99
spike.rb
1010
html
11+
.idea
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"intercom_id": "528f291df8d4a41d8c000088",
3+
"email": "[email protected]",
4+
"user_id": "123",
5+
"name": "Somebody",
6+
"created_at": 1270000000,
7+
"last_impression_at": 1300000000,
8+
"custom_data": {
9+
"app_name": "Genesis",
10+
"monthly_spend": 155.5,
11+
"team_mates": 7
12+
},
13+
"social_profiles": [
14+
{
15+
"type": "twitter",
16+
"url": "http://twitter.com/abc",
17+
"username": "abc"
18+
},
19+
{
20+
"type": "facebook",
21+
"url": "http://facebook.com/vanity",
22+
"username": "vanity",
23+
"id": "13241141441141413"
24+
}
25+
],
26+
"location_data": {
27+
"city_name": "Santiago",
28+
"continent_code": "SA",
29+
"country_name": "Chile",
30+
"latitude": -33.44999999999999,
31+
"longitude": -70.6667,
32+
"postal_code": "",
33+
"region_name": "12",
34+
"timezone": "Chile/Continental",
35+
"country_code": "CHL"
36+
},
37+
"session_count": 0,
38+
"last_seen_ip": "127.0.0.1",
39+
"last_seen_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11",
40+
"unsubscribed_from_emails": false,
41+
"avatar_url": "https://graph.facebook.com/13241141441141413/picture?width=24&height=24",
42+
"company_ids": [
43+
44+
]
45+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"unread_messages": 1
3+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"created_at": 1385114541,
3+
"updated_at": 1385028141,
4+
"read": true,
5+
"created_by_user": true,
6+
"thread_id": 5591,
7+
"message_id": 5591,
8+
"message_type": "conversation",
9+
"interrupt": true,
10+
"messages": [
11+
{
12+
"created_at": 1385114541,
13+
"url": null,
14+
"html": "<p>Hey Intercom, What is up?</p>\n\n<p></p>",
15+
"subject": "",
16+
"from": {
17+
"email": "[email protected]",
18+
"user_id": "456",
19+
"name": "Bob",
20+
"is_admin": false,
21+
"avatar": {
22+
}
23+
}
24+
},
25+
{
26+
"created_at": 1384941741,
27+
"url": null,
28+
"html": "<p>Not much, you?\n</p>"
29+
},
30+
{
31+
"created_at": 1385028141,
32+
"url": null,
33+
"html": "<p>Not much either :(</p>\n\n<p></p>",
34+
"from": {
35+
"email": "[email protected]",
36+
"user_id": "123",
37+
"name": "Bob",
38+
"is_admin": false,
39+
"avatar": {
40+
}
41+
}
42+
}
43+
]
44+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[
2+
{
3+
"created_at": 1385114400,
4+
"updated_at": 1385028000,
5+
"read": true,
6+
"created_by_user": true,
7+
"thread_id": 5591,
8+
"message_id": 5591,
9+
"message_type": "conversation",
10+
"interrupt": true,
11+
"messages": [
12+
{
13+
"created_at": 1385114400,
14+
"url": null,
15+
"html": "<p>Hey Intercom, What is up?</p>\n\n<p></p>",
16+
"subject": "",
17+
"from": {
18+
"email": "[email protected]",
19+
"user_id": "123",
20+
"name": "Somebody",
21+
"is_admin": false,
22+
"avatar": {
23+
}
24+
}
25+
},
26+
{
27+
"created_at": 1384941600,
28+
"url": null,
29+
"html": "<p>Not much, you?\n</p>"
30+
},
31+
{
32+
"created_at": 1385028000,
33+
"url": null,
34+
"html": "<p>Not much either :(</p>\n\n<p></p>",
35+
"from": {
36+
"email": "[email protected]",
37+
"user_id": "123",
38+
"name": "Somebody",
39+
"is_admin": false,
40+
"avatar": {
41+
}
42+
}
43+
}
44+
]
45+
}
46+
]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"html": "<p>This is a note</p>",
3+
"created_at": null,
4+
"user": {
5+
"intercom_id": "528f2cbb1b393a6e470000e6",
6+
"email": "[email protected]",
7+
"user_id": "123",
8+
"name": "Somebody",
9+
"created_at": 1270000000,
10+
"last_impression_at": 1300000000,
11+
"custom_data": {
12+
"app_name": "Genesis",
13+
"monthly_spend": 155.5,
14+
"team_mates": 7
15+
},
16+
"social_profiles": [
17+
{
18+
"type": "twitter",
19+
"url": "http://twitter.com/abc",
20+
"username": "abc"
21+
},
22+
{
23+
"type": "facebook",
24+
"url": "http://facebook.com/vanity",
25+
"username": "vanity",
26+
"id": "13241141441141413"
27+
}
28+
],
29+
"location_data": {
30+
"city_name": "Santiago",
31+
"continent_code": "SA",
32+
"country_name": "Chile",
33+
"latitude": -33.44999999999999,
34+
"longitude": -70.6667,
35+
"postal_code": "",
36+
"region_name": "12",
37+
"timezone": "Chile/Continental",
38+
"country_code": "CHL"
39+
},
40+
"session_count": 0,
41+
"last_seen_ip": "127.0.0.1",
42+
"last_seen_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11",
43+
"unsubscribed_from_emails": false,
44+
"avatar_url": "https://graph.facebook.com/13241141441141413/picture?width=24&height=24",
45+
"company_ids": [
46+
47+
]
48+
}
49+
}
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{
2+
"users": [
3+
{
4+
"intercom_id": "528f27c330972d783600006d",
5+
"email": "[email protected]",
6+
"user_id": "123",
7+
"name": "First User",
8+
"created_at": 1270000000,
9+
"last_impression_at": 1300000000,
10+
"custom_data": {
11+
"app_name": "Genesis",
12+
"monthly_spend": 155.5,
13+
"team_mates": 7
14+
},
15+
"social_profiles": [
16+
{
17+
"type": "twitter",
18+
"url": "http://twitter.com/abc",
19+
"username": "abc"
20+
},
21+
{
22+
"type": "facebook",
23+
"url": "http://facebook.com/vanity",
24+
"username": "vanity",
25+
"id": "13241141441141413"
26+
}
27+
],
28+
"location_data": {
29+
"city_name": "Santiago",
30+
"continent_code": "SA",
31+
"country_name": "Chile",
32+
"latitude": -33.44999999999999,
33+
"longitude": -70.6667,
34+
"postal_code": "",
35+
"region_name": "12",
36+
"timezone": "Chile/Continental",
37+
"country_code": "CHL"
38+
},
39+
"session_count": 0,
40+
"last_seen_ip": "127.0.0.1",
41+
"last_seen_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11",
42+
"unsubscribed_from_emails": false,
43+
"avatar_url": "https://graph.facebook.com/13241141441141413/picture?width=24&height=24",
44+
"company_ids": [
45+
46+
]
47+
},
48+
{
49+
"intercom_id": "528f27c330972d7836000070",
50+
"email": "[email protected]",
51+
"user_id": "123",
52+
"name": "Second User",
53+
"created_at": 1270000000,
54+
"last_impression_at": 1300000000,
55+
"custom_data": {
56+
"app_name": "Genesis",
57+
"monthly_spend": 155.5,
58+
"team_mates": 7
59+
},
60+
"social_profiles": [
61+
{
62+
"type": "twitter",
63+
"url": "http://twitter.com/abc",
64+
"username": "abc"
65+
},
66+
{
67+
"type": "facebook",
68+
"url": "http://facebook.com/vanity",
69+
"username": "vanity",
70+
"id": "13241141441141413"
71+
}
72+
],
73+
"location_data": {
74+
"city_name": "Santiago",
75+
"continent_code": "SA",
76+
"country_name": "Chile",
77+
"latitude": -33.44999999999999,
78+
"longitude": -70.6667,
79+
"postal_code": "",
80+
"region_name": "12",
81+
"timezone": "Chile/Continental",
82+
"country_code": "CHL"
83+
},
84+
"session_count": 0,
85+
"last_seen_ip": "127.0.0.1",
86+
"last_seen_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11",
87+
"unsubscribed_from_emails": false,
88+
"avatar_url": "https://graph.facebook.com/13241141441141413/picture?width=24&height=24",
89+
"company_ids": [
90+
91+
]
92+
},
93+
{
94+
"intercom_id": "528f27c330972d7836000073",
95+
"email": "[email protected]",
96+
"user_id": "123",
97+
"name": "Third User",
98+
"created_at": 1270000000,
99+
"last_impression_at": 1300000000,
100+
"custom_data": {
101+
"app_name": "Genesis",
102+
"monthly_spend": 155.5,
103+
"team_mates": 7
104+
},
105+
"social_profiles": [
106+
{
107+
"type": "twitter",
108+
"url": "http://twitter.com/abc",
109+
"username": "abc"
110+
},
111+
{
112+
"type": "facebook",
113+
"url": "http://facebook.com/vanity",
114+
"username": "vanity",
115+
"id": "13241141441141413"
116+
}
117+
],
118+
"location_data": {
119+
"city_name": "Santiago",
120+
"continent_code": "SA",
121+
"country_name": "Chile",
122+
"latitude": -33.44999999999999,
123+
"longitude": -70.6667,
124+
"postal_code": "",
125+
"region_name": "12",
126+
"timezone": "Chile/Continental",
127+
"country_code": "CHL"
128+
},
129+
"session_count": 0,
130+
"last_seen_ip": "127.0.0.1",
131+
"last_seen_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11",
132+
"unsubscribed_from_emails": false,
133+
"avatar_url": "https://graph.facebook.com/13241141441141413/picture?width=24&height=24",
134+
"company_ids": [
135+
136+
]
137+
}
138+
],
139+
"total_count": 3,
140+
"page": 1,
141+
"next_page": null,
142+
"previous_page": null,
143+
"total_pages": 1
144+
}

0 commit comments

Comments
 (0)