smart_params 2.0.7 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smart_params/field.rb +1 -1
- data/lib/smart_params/version.rb +1 -1
- data/lib/smart_params_spec.rb +34 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b54579906b5351c77e42e6d13b61202a320224efb455db82d2a1b1df87c1a9c
|
4
|
+
data.tar.gz: f3fa877d10818556ee873f7b90d0f8fbaf14f15783211f1dbcfde919ec7e8f31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b75dfea217c60818deee6e0ca0a4d8fb6aea539291903d9aebe888d87cf2cd3f8f7e2676b4df3bb8c1640c10e1f3767f9b2ca5839aed248040bbb6a5d504f91a
|
7
|
+
data.tar.gz: 121728e46d52c0ed63243779298aed1d510f09cfc2f8feb15cda092f5be858b1542fbc3d4bef41270de13db7ca718069cbb9123316689d2daacfb49085503d6f
|
data/lib/smart_params/field.rb
CHANGED
data/lib/smart_params/version.rb
CHANGED
data/lib/smart_params_spec.rb
CHANGED
@@ -115,6 +115,40 @@ RSpec.describe SmartParams do
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
118
|
+
context "with string key params" do
|
119
|
+
let(:params) do
|
120
|
+
{
|
121
|
+
data: {
|
122
|
+
type: "accounts",
|
123
|
+
attributes: {
|
124
|
+
email: "kurtis@example.com",
|
125
|
+
"full-name" => "Kurtis Rainbolt-Greene"
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
end
|
130
|
+
|
131
|
+
it "returns as json" do
|
132
|
+
expect(
|
133
|
+
subject
|
134
|
+
).to match(
|
135
|
+
{
|
136
|
+
"data" => hash_including(
|
137
|
+
{
|
138
|
+
"type" => "accounts",
|
139
|
+
"attributes" => hash_including(
|
140
|
+
{
|
141
|
+
"email" => "kurtis@example.com",
|
142
|
+
"full-name" => "Kurtis Rainbolt-Greene"
|
143
|
+
}
|
144
|
+
)
|
145
|
+
}
|
146
|
+
),
|
147
|
+
}
|
148
|
+
)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
118
152
|
context "with a reasonably good params" do
|
119
153
|
let(:params) do
|
120
154
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_params
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kurtis Rainbolt-Greene
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|