Skip to content

Commit

Permalink
Merge pull request #88 from maxmind/greg/ws-connection-type
Browse files Browse the repository at this point in the history
Add connection_type to fixture file and tests
  • Loading branch information
faktas2 authored Oct 20, 2023
2 parents 7be1638 + 9f09cd9 commit f9e8b93
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
9 changes: 5 additions & 4 deletions spec/fixtures/files/factors-response1.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"time_zone": "Europe/London"
},
"postal": {
"code": "H0H",
"confidence": 99
"code": "H0H",
"confidence": 99
},
"registered_country": {
"geoname_id": 6252001,
Expand Down Expand Up @@ -113,6 +113,7 @@
"traits": {
"autonomous_system_number": 123,
"autonomous_system_organization": "Foo Inc",
"connection_type": "Cable/DSL",
"domain": "in-addr.arpa",
"ip_address": "152.216.7.110",
"is_anonymous": true,
Expand All @@ -122,8 +123,8 @@
"is_satellite_provider": true,
"is_tor_exit_node": true,
"isp": "Andrews & Arnold Ltd",
"mobile_country_code" : "310",
"mobile_network_code" : "004",
"mobile_country_code": "310",
"mobile_network_code": "004",
"organization": "STONEHOUSE office network",
"static_ip_score": 13.5,
"user_count": 5,
Expand Down
11 changes: 6 additions & 5 deletions spec/fixtures/files/insights-response1.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
"time_zone": "Europe/London"
},
"postal": {
"code": "H0H",
"confidence": 99
"code": "H0H",
"confidence": 99
},
"registered_country": {
"geoname_id": 6252001,
Expand Down Expand Up @@ -124,6 +124,7 @@
"traits": {
"autonomous_system_number": 123,
"autonomous_system_organization": "Foo Inc",
"connection_type": "Cable/DSL",
"domain": "in-addr.arpa",
"ip_address": "152.216.7.110",
"is_anonymous": true,
Expand All @@ -134,8 +135,8 @@
"is_satellite_provider": true,
"is_tor_exit_node": true,
"isp": "Andrews & Arnold Ltd",
"mobile_country_code" : "310",
"mobile_network_code" : "004",
"mobile_country_code": "310",
"mobile_network_code": "004",
"organization": "STONEHOUSE office network",
"static_ip_score": 13.5,
"user_count": 5,
Expand Down Expand Up @@ -172,7 +173,7 @@
},
"email": {
"domain": {
"first_seen": "2016-01-03"
"first_seen": "2016-01-03"
},
"first_seen": "2017-01-02",
"is_disposable": true,
Expand Down
5 changes: 3 additions & 2 deletions spec/fixtures/files/insights-response2.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
}
},
"postal": {
"code": "H0H",
"confidence": 99
"code": "H0H",
"confidence": 99
},
"registered_country": {
"geoname_id": 6252001,
Expand Down Expand Up @@ -85,6 +85,7 @@
],
"traits": {
"autonomous_system_organization": "Foo Inc",
"connection_type": "Corporate",
"domain": "in-addr.arpa",
"ip_address": "152.216.7.110",
"is_anonymous_vpn": true,
Expand Down
2 changes: 2 additions & 0 deletions spec/model/insights_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

expect(m.ip_address.traits.autonomous_system_number).to eq 123
expect(m.ip_address.traits.autonomous_system_organization).to eq 'Foo Inc'
expect(m.ip_address.traits.connection_type).to eq 'Cable/DSL'
expect(m.ip_address.traits.domain).to eq 'in-addr.arpa'
expect(m.ip_address.traits.ip_address).to eq '152.216.7.110'
expect(m.ip_address.traits.anonymous?).to eq true
Expand Down Expand Up @@ -165,6 +166,7 @@
expect(m.ip_address.traits.autonomous_system_number).to eq nil
expect(m.ip_address.traits.autonomous_system_organization).to eq 'Foo Inc'
expect(m.ip_address.traits.anonymous?).to eq false
expect(m.ip_address.traits.connection_type).to eq 'Corporate'
expect(m.ip_address.traits.residential_proxy?).to eq false
expect(m.ip_address.traits.is_satellite_provider).to eq false
expect(m.ip_address.traits.tor_exit_node?).to eq false
Expand Down

0 comments on commit f9e8b93

Please sign in to comment.