Skip to content

Commit 9f09cd9

Browse files
committed
Add connection_type to fixture file and tests
1 parent 7be1638 commit 9f09cd9

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

spec/fixtures/files/factors-response1.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
"time_zone": "Europe/London"
6464
},
6565
"postal": {
66-
"code": "H0H",
67-
"confidence": 99
66+
"code": "H0H",
67+
"confidence": 99
6868
},
6969
"registered_country": {
7070
"geoname_id": 6252001,
@@ -113,6 +113,7 @@
113113
"traits": {
114114
"autonomous_system_number": 123,
115115
"autonomous_system_organization": "Foo Inc",
116+
"connection_type": "Cable/DSL",
116117
"domain": "in-addr.arpa",
117118
"ip_address": "152.216.7.110",
118119
"is_anonymous": true,
@@ -122,8 +123,8 @@
122123
"is_satellite_provider": true,
123124
"is_tor_exit_node": true,
124125
"isp": "Andrews & Arnold Ltd",
125-
"mobile_country_code" : "310",
126-
"mobile_network_code" : "004",
126+
"mobile_country_code": "310",
127+
"mobile_network_code": "004",
127128
"organization": "STONEHOUSE office network",
128129
"static_ip_score": 13.5,
129130
"user_count": 5,

spec/fixtures/files/insights-response1.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
"time_zone": "Europe/London"
7575
},
7676
"postal": {
77-
"code": "H0H",
78-
"confidence": 99
77+
"code": "H0H",
78+
"confidence": 99
7979
},
8080
"registered_country": {
8181
"geoname_id": 6252001,
@@ -124,6 +124,7 @@
124124
"traits": {
125125
"autonomous_system_number": 123,
126126
"autonomous_system_organization": "Foo Inc",
127+
"connection_type": "Cable/DSL",
127128
"domain": "in-addr.arpa",
128129
"ip_address": "152.216.7.110",
129130
"is_anonymous": true,
@@ -134,8 +135,8 @@
134135
"is_satellite_provider": true,
135136
"is_tor_exit_node": true,
136137
"isp": "Andrews & Arnold Ltd",
137-
"mobile_country_code" : "310",
138-
"mobile_network_code" : "004",
138+
"mobile_country_code": "310",
139+
"mobile_network_code": "004",
139140
"organization": "STONEHOUSE office network",
140141
"static_ip_score": 13.5,
141142
"user_count": 5,
@@ -172,7 +173,7 @@
172173
},
173174
"email": {
174175
"domain": {
175-
"first_seen": "2016-01-03"
176+
"first_seen": "2016-01-03"
176177
},
177178
"first_seen": "2017-01-02",
178179
"is_disposable": true,

spec/fixtures/files/insights-response2.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
}
3737
},
3838
"postal": {
39-
"code": "H0H",
40-
"confidence": 99
39+
"code": "H0H",
40+
"confidence": 99
4141
},
4242
"registered_country": {
4343
"geoname_id": 6252001,
@@ -85,6 +85,7 @@
8585
],
8686
"traits": {
8787
"autonomous_system_organization": "Foo Inc",
88+
"connection_type": "Corporate",
8889
"domain": "in-addr.arpa",
8990
"ip_address": "152.216.7.110",
9091
"is_anonymous_vpn": true,

spec/model/insights_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070

7171
expect(m.ip_address.traits.autonomous_system_number).to eq 123
7272
expect(m.ip_address.traits.autonomous_system_organization).to eq 'Foo Inc'
73+
expect(m.ip_address.traits.connection_type).to eq 'Cable/DSL'
7374
expect(m.ip_address.traits.domain).to eq 'in-addr.arpa'
7475
expect(m.ip_address.traits.ip_address).to eq '152.216.7.110'
7576
expect(m.ip_address.traits.anonymous?).to eq true
@@ -165,6 +166,7 @@
165166
expect(m.ip_address.traits.autonomous_system_number).to eq nil
166167
expect(m.ip_address.traits.autonomous_system_organization).to eq 'Foo Inc'
167168
expect(m.ip_address.traits.anonymous?).to eq false
169+
expect(m.ip_address.traits.connection_type).to eq 'Corporate'
168170
expect(m.ip_address.traits.residential_proxy?).to eq false
169171
expect(m.ip_address.traits.is_satellite_provider).to eq false
170172
expect(m.ip_address.traits.tor_exit_node?).to eq false

0 commit comments

Comments
 (0)