query_string 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/query_string.rb +1 -1
- data/lib/query_string/version.rb +1 -1
- data/spec/query_string_spec.rb +14 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a6d119d6d5281b6138fafdde98de3e34846b63a10b1dcc9025114cabc8bcd9b1
|
|
4
|
+
data.tar.gz: 92ca36d16624349ef960fb802387eeb1a1ec5ebdeabe1218c4ad6e6682ea671e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e30ccd8261145df8ea51c93b63cc78a6eabb8447ca74f5849b0420ba328674ac9d3c7f0646bf6aab00e26b82ef7e968f5081a401849f973d6c28c33625742f64
|
|
7
|
+
data.tar.gz: f40646a74ddd0a1ef7e419c92b9df8f14394930d2849f1eb756c2740c8e45b46f8076b45a5c7e3f638011dd540b76877bf23af6d4b049b385525871748b9308d
|
data/lib/query_string.rb
CHANGED
data/lib/query_string/version.rb
CHANGED
data/spec/query_string_spec.rb
CHANGED
|
@@ -73,16 +73,28 @@ describe QueryString do
|
|
|
73
73
|
it { is_expected.to eq 'a[]=' }
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
context 'input is Hash with empty Hash value' do
|
|
76
|
+
context 'input is Hash with only empty Hash value' do
|
|
77
77
|
let(:input) { { a: {} } }
|
|
78
78
|
|
|
79
79
|
it { is_expected.to eq '' }
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
-
context 'input is Hash with empty Array value' do
|
|
82
|
+
context 'input is Hash with only empty Array value' do
|
|
83
83
|
let(:input) { { a: [] } }
|
|
84
84
|
|
|
85
85
|
it { is_expected.to eq '' }
|
|
86
86
|
end
|
|
87
|
+
|
|
88
|
+
context 'input is Hash with empty Hash value' do
|
|
89
|
+
let(:input) { { a: 'b', c: {} } }
|
|
90
|
+
|
|
91
|
+
it { is_expected.to eq 'a=b' }
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
context 'input is Hash with empty Array value' do
|
|
95
|
+
let(:input) { { a: 'b', c: [] } }
|
|
96
|
+
|
|
97
|
+
it { is_expected.to eq 'a=b' }
|
|
98
|
+
end
|
|
87
99
|
end
|
|
88
100
|
end
|