spec/lib/country_spec.rb in geolookup-0.6.1 vs spec/lib/country_spec.rb in geolookup-0.6.2
- old
+ new
@@ -10,6 +10,16 @@
it "returns a lat/long array if country name matches" do
expect(Geolookup::Country.name_to_lat_long("United States")).to eql([38000000, -97000000])
end
end
-end
\ No newline at end of file
+
+ describe "#find_country_phone_code" do
+ it "expects a country phone code when given a country code" do
+ expect(Geolookup::Country::PhoneCodes.country_to_phone_code('DZ')).to eq(213)
+ end
+
+ it "expects an array of country phone codes" do
+ expect(Geolookup::Country::PhoneCodes.country_phone_codes).to include(213)
+ end
+ end
+end