Sha256: 3a8185360fcca58ba26e79183f77830cf1197fd72b8ecc8600734917dbab3ddd
Contents?: true
Size: 579 Bytes
Versions: 1
Compression:
Stored size: 579 Bytes
Contents
require 'spec_helper' module TrackingNumberValidator describe Service do describe "#detect" do it "detects DHL" do expect(Service.detect("425434056299")).to eq :dhl expect(Service.detect("2551295854")).to eq :dhl expect(Service.detect("1010095723370011934800578986681571")).to eq :fed_ex_ground expect(Service.detect("foooo")).to eq nil end it "sanitizes the input" do expect(Service.detect(" 425434056299 ")).to eq :dhl expect(Service.detect("_425434056299_")).to eq :dhl end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tracking_number_validator-0.0.1 | spec/lib/traking_number_validator/service_spec.rb |