This involves a small amount of changing the fixtures since we're using the regexp and not the full url matching powers of webmock.
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
/?geoit=XML&postal=A1B%202C3:
|
|
code: 200
|
|
body: |
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<geodata>
|
|
<latt>47.172520</latt>
|
|
<longt>-55.440515</longt>
|
|
<postal>A1B2C3</postal>
|
|
<standard>
|
|
<stnumber>1</stnumber>
|
|
<staddress/>
|
|
<city>ST. JOHN&'S</city>
|
|
<prov>NL</prov>
|
|
<confidence>0.9</confidence>
|
|
</standard>
|
|
</geodata>
|
|
|
|
/?geoit=XML&postal=k1a%200b1:
|
|
code: 200
|
|
body: |
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<geodata>
|
|
<latt>45.375437</latt>
|
|
<longt>-75.691041</longt>
|
|
<postal>K1A0B1</postal>
|
|
<standard>
|
|
<stnumber>1</stnumber>
|
|
<staddress/>
|
|
<city>OTTAWA</city>
|
|
<prov>ON</prov>
|
|
<confidence>0.9</confidence>
|
|
</standard>
|
|
</geodata>
|
|
|
|
/?geoit=XML&postal=Q0Q%200Q0:
|
|
code: 200
|
|
body: |
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<geodata>
|
|
<error>
|
|
<code>008</code>
|
|
<description>Your request did not produce any results. Check your spelling and try again.</description>
|
|
</error>
|
|
<latt/>
|
|
<longt>-</longt>
|
|
<postal>Q0Q0Q0</postal>
|
|
<standard>
|
|
<stnumber>1</stnumber>
|
|
<staddress/>
|
|
<city/>
|
|
<prov/>
|
|
<confidence>0.9</confidence>
|
|
</standard>
|
|
</geodata>
|