radiant-forms-extension 3.3.1 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/forms/tags/core.rb +8 -0
- data/radiant-forms-extension.gemspec +1 -1
- data/spec/lib/forms/tags/core_spec.rb +23 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.2
|
data/lib/forms/tags/core.rb
CHANGED
@@ -35,6 +35,7 @@ describe Forms::Tags::Core do
|
|
35
35
|
'response:if_get',
|
36
36
|
'response:unless_get',
|
37
37
|
|
38
|
+
'param',
|
38
39
|
'index',
|
39
40
|
'reset'
|
40
41
|
].sort
|
@@ -133,7 +134,7 @@ describe Forms::Tags::Core do
|
|
133
134
|
it 'should require the name attribute' do
|
134
135
|
tag = %{<r:form:radios />}
|
135
136
|
@page.should_not render(tag)
|
136
|
-
end
|
137
|
+
end
|
137
138
|
|
138
139
|
end
|
139
140
|
|
@@ -147,6 +148,27 @@ describe Forms::Tags::Core do
|
|
147
148
|
|
148
149
|
end
|
149
150
|
|
151
|
+
context 'params' do
|
152
|
+
|
153
|
+
before :each do
|
154
|
+
@page = pages(:home)
|
155
|
+
end
|
156
|
+
|
157
|
+
it 'should return the parameter' do
|
158
|
+
stub(@page).params { {'token'=>'success'}}
|
159
|
+
tag = %{<r:param name='token' />}
|
160
|
+
exp = %{success}
|
161
|
+
@page.should render(tag).as(exp)
|
162
|
+
end
|
163
|
+
|
164
|
+
it 'should return nil on a missing parameter' do
|
165
|
+
tag = %{<r:param name='broken' />}
|
166
|
+
exp = %{}
|
167
|
+
@page.should render(tag).as(exp)
|
168
|
+
end
|
169
|
+
|
170
|
+
end
|
171
|
+
|
150
172
|
context 'response' do
|
151
173
|
|
152
174
|
context 'conditionals' do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-forms-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 3.3.
|
9
|
+
- 2
|
10
|
+
version: 3.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- dirkkelly
|