sucker 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sucker/request.rb +1 -1
- data/spec/integration/france_spec.rb +3 -2
- data/spec/unit/sucker/request_spec.rb +12 -0
- metadata +3 -3
data/lib/sucker/request.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require "spec_helper"
|
2
4
|
|
3
5
|
module Sucker
|
4
|
-
describe "
|
6
|
+
describe "Un lookup français" do
|
5
7
|
before do
|
6
8
|
@worker = Sucker.new(
|
7
9
|
:locale => "fr",
|
@@ -44,7 +46,6 @@ module Sucker
|
|
44
46
|
before do
|
45
47
|
@worker << { "ItemId" => ["0816614024", "0143105825"] }
|
46
48
|
@items = @worker.get.to_h["ItemLookupResponse"]["Items"]["Item"]
|
47
|
-
pp @items
|
48
49
|
end
|
49
50
|
|
50
51
|
it "returns two items" do
|
@@ -76,6 +76,18 @@ module Sucker
|
|
76
76
|
query = @worker.send(:build_query)
|
77
77
|
query.should match /Foo=bar%2Cbaz/
|
78
78
|
end
|
79
|
+
|
80
|
+
it "handles integer parameter values" do
|
81
|
+
@worker.parameters["Foo"] = 1
|
82
|
+
query = @worker.send(:build_query)
|
83
|
+
query.should match /Foo=1/
|
84
|
+
end
|
85
|
+
|
86
|
+
it "handles floating-point parameter values" do
|
87
|
+
@worker.parameters["Foo"] = 1.0
|
88
|
+
query = @worker.send(:build_query)
|
89
|
+
query.should match /Foo=1/
|
90
|
+
end
|
79
91
|
end
|
80
92
|
|
81
93
|
context "#host" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sucker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 3
|
10
|
+
version: 0.6.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Hakan Ensari
|