Sha256: d5ed88940cb1fc5241849811ab4d16e81f96b6213282f1637bd0dcbdaee5f72d

Contents?: true

Size: 491 Bytes

Versions: 3

Compression:

Stored size: 491 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe "Ip2location" do
  it "work correctly with web service lookup" do
    ws = Ip2locationWebService.new('demo', 'WS25', true)
    record = ws.lookup('8.8.8.8', '', 'en')
    expect(record['country_code']).to eq 'US'
  end

  it "work correctly with web service get_credit" do
    ws = Ip2locationWebService.new('demo', 'WS25', true)
    record = ws.get_credit()
    expect(record).to_not eq 0
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ip2location_ruby-8.3.2 spec/ip2location_ruby_webservice_spec.rb
ip2location_ruby-8.3.1 spec/ip2location_ruby_webservice_spec.rb
ip2location_ruby-8.3.0 spec/ip2location_ruby_webservice_spec.rb