BUGFIX: IP lookup wasn't working when using HTTPS

REFACTOR: the ip locator into a ip-lookup component
This commit is contained in:
Régis Hanol
2014-07-07 22:18:18 +02:00
parent 18fafa12a2
commit 59b5ba7c0f
12 changed files with 125 additions and 64 deletions

View File

@ -371,6 +371,15 @@ describe Admin::UsersController do
end
end
context 'ip-info' do
it "uses ipinfo.io webservice to retrieve the info" do
Excon.expects(:get).with("http://ipinfo.io/123.123.123.123/json", read_timeout: 30, connect_timeout: 30)
xhr :get, :ip_info, ip: "123.123.123.123"
end
end
end
end