action_control 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ff83069f1593d23c7714480045b3e4038234275d
4
- data.tar.gz: 69add1874adfd24a1d98bde7fab1ecfc4f68fcca
3
+ metadata.gz: ce6eece559bac48581aab01d9a780b4a0b653297
4
+ data.tar.gz: 6484b153643eab7cc6bd2f1b83cabb9f2150664b
5
5
  SHA512:
6
- metadata.gz: 75107c4ec1c0675ced0ac10b0537a406eb80225b397a1642fa7c0e8d834d6021ca1ed788511ef58dee98853e456630a084fcbd0a88903bd9405b427cf68d4059
7
- data.tar.gz: c0792a2f45c18e26150db2a5776e40c989bdfb9276af6a38a17d1872dd2dddc0cea3816e9e2a108f8d8197b80f094f1a51a2c5cc4627a9ebfbb289adc564e0d5
6
+ metadata.gz: 4ad4616ae8620566a63e047c9a3211a28839cefff5f0a418a8ff630484bcb70ae2e81def4b6d155ff4e94dd923c52bc9ef54db78ae8fba5984a11ccc82e81bb9
7
+ data.tar.gz: fe9ebe9737f7e8cd80c7b24013f825bc67612380d64956f6284d133ed86668ee38b4eaa6357fd7699987c5a2f34c5c7a3df9ecad14d665f978cee2daccdb8506
@@ -9,12 +9,21 @@ module ActionControl
9
9
  # This ensures that you actually do authorization in your controller.
10
10
  raise ActionControl::AuthorizationNotPerformedError unless defined?(authorized?)
11
11
 
12
+ error = {}
13
+ is_authorized = nil
14
+
15
+ if method(:authorized?).arity > 0
16
+ is_authorized = authorized?(error)
17
+ else
18
+ is_authorized = authorized?
19
+ end
20
+
12
21
  # If the authorized? method does not return true
13
22
  # it raises the ActionControl::NotAuthorizedError
14
23
  #
15
24
  # Use the .rescue_from method from ActionController::Base
16
25
  # to catch the exception and show the user a proper error message.
17
- raise ActionControl::NotAuthorizedError unless authorized? == true
26
+ raise ActionControl::NotAuthorizedError.new(error) unless is_authorized == true
18
27
  end
19
28
 
20
29
  # Authenticates the user
@@ -24,12 +33,21 @@ module ActionControl
24
33
  # This ensures that you actually do authentication in your controller.
25
34
  raise ActionControl::AuthenticationNotPerformedError unless defined?(authenticated?)
26
35
 
36
+ error = {}
37
+ is_authenticated = nil
38
+
39
+ if method(:authenticated?).arity > 0
40
+ is_authenticated = authenticated?(error)
41
+ else
42
+ is_authenticated = authenticated?
43
+ end
44
+
27
45
  # If the authenticated? method returns not true
28
46
  # it raises the ActionControl::NotAuthenticatedError.
29
47
  #
30
48
  # Use the .rescue_from method from ActionController::Base
31
49
  # to catch the exception and show the user a proper error message.
32
- raise ActionControl::NotAuthenticatedError unless authenticated? == true
50
+ raise ActionControl::NotAuthenticatedError.new(error) unless is_authenticated == true
33
51
  end
34
52
  end
35
53
 
@@ -25,6 +25,11 @@ module ActionControl
25
25
  # Should always be called at the end
26
26
  # of the #authorize! method.
27
27
  class NotAuthorizedError < AuthorizationError
28
+ attr_reader :error
29
+
30
+ def initialize(error={})
31
+ @error = error
32
+ end
28
33
  end
29
34
 
30
35
 
@@ -52,5 +57,10 @@ module ActionControl
52
57
  # Should always be called at the end
53
58
  # of the #authenticate! method.
54
59
  class NotAuthenticatedError < AuthenticationError
60
+ attr_reader :error
61
+
62
+ def initialize(error={})
63
+ @error = error
64
+ end
55
65
  end
56
66
  end
@@ -1,3 +1,3 @@
1
1
  module ActionControl
2
- VERSION = "0.2"
2
+ VERSION = "0.3"
3
3
  end
@@ -23,6 +23,36 @@ class ActionControlTest < ActiveSupport::TestCase
23
23
  end
24
24
  end
25
25
 
26
+ test 'should raise `NotAuthorizedError` if #authorized? with argument returns not true' do
27
+ @authorizable.class_eval do
28
+ def authorized?(error); false; end
29
+ end
30
+
31
+ assert_raise ActionControl::NotAuthorizedError do
32
+ @authorizable.new.authorize!
33
+ end
34
+ end
35
+
36
+ test 'should raise `NotAuthorizedError` if #authorized? with argument and custom error returns not true' do
37
+ @authorizable.class_eval do
38
+ def authorized?(error)
39
+ error[:code] = 'DEMO_CODE'
40
+ error[:message] = 'Demo message'
41
+
42
+ false
43
+ end
44
+ end
45
+
46
+ begin
47
+ @authorizable.new.authorize!
48
+ rescue ActionControl::NotAuthorizedError => e
49
+ error = e.error
50
+
51
+ assert_equal error[:code], 'DEMO_CODE'
52
+ assert_equal error[:message], 'Demo message'
53
+ end
54
+ end
55
+
26
56
  test 'should raise no exception if #authorized? returns true' do
27
57
  @authorizable.class_eval do
28
58
  def authorized?; true; end
@@ -33,6 +63,16 @@ class ActionControlTest < ActiveSupport::TestCase
33
63
  end
34
64
  end
35
65
 
66
+ test 'should raise no exception if #authorized? with argument returns true' do
67
+ @authorizable.class_eval do
68
+ def authorized?(error); true; end
69
+ end
70
+
71
+ assert_nothing_raised do
72
+ @authorizable.new.authorize!
73
+ end
74
+ end
75
+
36
76
 
37
77
  test 'should raise `AuthenticationNotPerformedError` if #authenticated? is not defined' do
38
78
  assert_raise ActionControl::AuthenticationNotPerformedError do
@@ -50,6 +90,36 @@ class ActionControlTest < ActiveSupport::TestCase
50
90
  end
51
91
  end
52
92
 
93
+ test 'should raise `NotAuthenticatedError` if #authenticated? with argument returns not true' do
94
+ @authorizable.class_eval do
95
+ def authenticated?(error); false; end
96
+ end
97
+
98
+ assert_raise ActionControl::NotAuthenticatedError do
99
+ @authorizable.new.authenticate!
100
+ end
101
+ end
102
+
103
+ test 'should raise `NotAuthenticatedError` if #authenticated? with argument and custom error returns not true' do
104
+ @authorizable.class_eval do
105
+ def authenticated?(error)
106
+ error[:code] = 'DEMO_CODE'
107
+ error[:message] = 'Demo message'
108
+
109
+ false
110
+ end
111
+ end
112
+
113
+ begin
114
+ @authorizable.new.authenticate!
115
+ rescue ActionControl::NotAuthenticatedError => e
116
+ error = e.error
117
+
118
+ assert_equal error[:code], 'DEMO_CODE'
119
+ assert_equal error[:message], 'Demo message'
120
+ end
121
+ end
122
+
53
123
  test 'should raise no exception if #authenticated? returns true' do
54
124
  @authorizable.class_eval do
55
125
  def authenticated?; true; end
@@ -59,4 +129,14 @@ class ActionControlTest < ActiveSupport::TestCase
59
129
  @authorizable.new.authenticate!
60
130
  end
61
131
  end
132
+
133
+ test 'should raise no exception if #authenticated? with argument returns true' do
134
+ @authorizable.class_eval do
135
+ def authenticated?(error); true; end
136
+ end
137
+
138
+ assert_nothing_raised do
139
+ @authorizable.new.authenticate!
140
+ end
141
+ end
62
142
  end
@@ -1,63 +1,672 @@
1
+ ---------------------------------------------------------------
2
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
3
+ ---------------------------------------------------------------
4
+ ------------------------------------------------------------------------------------------------
5
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
6
+ ------------------------------------------------------------------------------------------------
7
+ ------------------------------------------------------------------------------
8
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
9
+ ------------------------------------------------------------------------------
10
+ ---------------------------------------------------------------------------------
11
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
12
+ ---------------------------------------------------------------------------------
13
+ ------------------------------------------------------------------------------------------
14
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
15
+ ------------------------------------------------------------------------------------------
16
+ ----------------------------------------------------------------------------------------------------
17
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
18
+ ----------------------------------------------------------------------------------------------------
19
+ --------------------------------------------------------------------------------------------------------
20
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
21
+ --------------------------------------------------------------------------------------------------------
22
+ ---------------------------------------------------------------
23
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
24
+ ---------------------------------------------------------------
25
+ ---------------------------------------------------------------------------------
26
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
27
+ ---------------------------------------------------------------------------------
28
+ ------------------------------------------------------------------------------------------------
29
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
30
+ ------------------------------------------------------------------------------------------------
1
31
  ----------------------------------------------------------------------------------------------------
2
32
  ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
3
33
  ----------------------------------------------------------------------------------------------------
34
+ --------------------------------------------------------------------------------------------------------
35
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
36
+ --------------------------------------------------------------------------------------------------------
37
+ ------------------------------------------------------------------------------------------
38
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
39
+ ------------------------------------------------------------------------------------------
40
+ ------------------------------------------------------------------------------
41
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
42
+ ------------------------------------------------------------------------------
43
+ ------------------------------------------------------------------------------------------
44
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
45
+ ------------------------------------------------------------------------------------------
4
46
  ------------------------------------------------------------------------------
5
47
  ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
6
48
  ------------------------------------------------------------------------------
7
49
  --------------------------------------------------------------------------------------------------------
8
50
  ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
9
51
  --------------------------------------------------------------------------------------------------------
52
+ ---------------------------------------------------------------------------------
53
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
54
+ ---------------------------------------------------------------------------------
55
+ ----------------------------------------------------------------------------------------------------
56
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
57
+ ----------------------------------------------------------------------------------------------------
58
+ ------------------------------------------------------------------------------------------------
59
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
60
+ ------------------------------------------------------------------------------------------------
61
+ ---------------------------------------------------------------
62
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
63
+ ---------------------------------------------------------------
64
+ --------------------------------------------------------------------------------------------------------
65
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
66
+ --------------------------------------------------------------------------------------------------------
67
+ ------------------------------------------------------------------------------------------------
68
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
69
+ ------------------------------------------------------------------------------------------------
10
70
  ------------------------------------------------------------------------------------------
11
71
  ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
12
72
  ------------------------------------------------------------------------------------------
13
73
  ---------------------------------------------------------------------------------
14
74
  ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
15
75
  ---------------------------------------------------------------------------------
76
+ ------------------------------------------------------------------------------
77
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
78
+ ------------------------------------------------------------------------------
79
+ ----------------------------------------------------------------------------------------------------
80
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
81
+ ----------------------------------------------------------------------------------------------------
82
+ ---------------------------------------------------------------
83
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
84
+ ---------------------------------------------------------------
85
+ ---------------------------------------------------------------
86
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
87
+ ---------------------------------------------------------------
88
+ ------------------------------------------------------------------------------------------
89
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
90
+ ------------------------------------------------------------------------------------------
91
+ ---------------------------------------------------------------------------------
92
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
93
+ ---------------------------------------------------------------------------------
94
+ ------------------------------------------------------------------------------
95
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
96
+ ------------------------------------------------------------------------------
97
+ --------------------------------------------------------------------------------------------------------
98
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
99
+ --------------------------------------------------------------------------------------------------------
100
+ ----------------------------------------------------------------------------------------------------
101
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
102
+ ----------------------------------------------------------------------------------------------------
16
103
  ------------------------------------------------------------------------------------------------
17
104
  ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
18
105
  ------------------------------------------------------------------------------------------------
19
106
  ---------------------------------------------------------------
20
107
  WelcomeControllerTest: test_controller_has_a_#authorize!_method
21
108
  ---------------------------------------------------------------
109
+ ----------------------------------------------------------------------------------------------------
110
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
111
+ ----------------------------------------------------------------------------------------------------
22
112
  ------------------------------------------------------------------------------------------------
23
113
  ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
24
114
  ------------------------------------------------------------------------------------------------
115
+ ------------------------------------------------------------------------------
116
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
117
+ ------------------------------------------------------------------------------
118
+ --------------------------------------------------------------------------------------------------------
119
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
120
+ --------------------------------------------------------------------------------------------------------
121
+ ---------------------------------------------------------------------------------
122
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
123
+ ---------------------------------------------------------------------------------
25
124
  ------------------------------------------------------------------------------------------
26
125
  ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
27
126
  ------------------------------------------------------------------------------------------
127
+ ---------------------------------------------------------------
128
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
129
+ ---------------------------------------------------------------
28
130
  ---------------------------------------------------------------------------------
29
131
  ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
30
132
  ---------------------------------------------------------------------------------
133
+ --------------------------------------------------------------------------------------------------------
134
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
135
+ --------------------------------------------------------------------------------------------------------
136
+ ------------------------------------------------------------------------------------------
137
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
138
+ ------------------------------------------------------------------------------------------
31
139
  ----------------------------------------------------------------------------------------------------
32
140
  ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
33
141
  ----------------------------------------------------------------------------------------------------
142
+ ------------------------------------------------------------------------------------------------
143
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
144
+ ------------------------------------------------------------------------------------------------
145
+ ------------------------------------------------------------------------------
146
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
147
+ ------------------------------------------------------------------------------
148
+ ---------------------------------------------------------------
149
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
150
+ ---------------------------------------------------------------
151
+ ------------------------------------------------------------------------------
152
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
153
+ ------------------------------------------------------------------------------
154
+ ------------------------------------------------------------------------------------------
155
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
156
+ ------------------------------------------------------------------------------------------
157
+ --------------------------------------------------------------------------------------------------------
158
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
159
+ --------------------------------------------------------------------------------------------------------
160
+ ----------------------------------------------------------------------------------------------------
161
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
162
+ ----------------------------------------------------------------------------------------------------
163
+ ---------------------------------------------------------------------------------
164
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
165
+ ---------------------------------------------------------------------------------
166
+ ------------------------------------------------------------------------------------------------
167
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
168
+ ------------------------------------------------------------------------------------------------
169
+ ---------------------------------------------------------------
170
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
171
+ ---------------------------------------------------------------
172
+ ------------------------------------------------------------------------------------------------
173
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
174
+ ------------------------------------------------------------------------------------------------
175
+ ------------------------------------------------------------------------------------------
176
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
177
+ ------------------------------------------------------------------------------------------
178
+ ------------------------------------------------------------------------------
179
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
180
+ ------------------------------------------------------------------------------
181
+ ---------------------------------------------------------------------------------
182
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
183
+ ---------------------------------------------------------------------------------
34
184
  --------------------------------------------------------------------------------------------------------
35
185
  ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
36
186
  --------------------------------------------------------------------------------------------------------
187
+ ----------------------------------------------------------------------------------------------------
188
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
189
+ ----------------------------------------------------------------------------------------------------
190
+ ---------------------------------------------------------------
191
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
192
+ ---------------------------------------------------------------
193
+ ---------------------------------------------------------------------------------
194
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
195
+ ---------------------------------------------------------------------------------
196
+ ------------------------------------------------------------------------------------------
197
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
198
+ ------------------------------------------------------------------------------------------
199
+ ------------------------------------------------------------------------------------------------
200
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
201
+ ------------------------------------------------------------------------------------------------
37
202
  ------------------------------------------------------------------------------
38
203
  ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
39
204
  ------------------------------------------------------------------------------
205
+ ----------------------------------------------------------------------------------------------------
206
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
207
+ ----------------------------------------------------------------------------------------------------
208
+ --------------------------------------------------------------------------------------------------------
209
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
210
+ --------------------------------------------------------------------------------------------------------
40
211
  ---------------------------------------------------------------
41
212
  WelcomeControllerTest: test_controller_has_a_#authorize!_method
42
213
  ---------------------------------------------------------------
43
214
  ------------------------------------------------------------------------------------------------
44
215
  ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
45
216
  ------------------------------------------------------------------------------------------------
217
+ ------------------------------------------------------------------------------
218
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
219
+ ------------------------------------------------------------------------------
220
+ ----------------------------------------------------------------------------------------------------
221
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
222
+ ----------------------------------------------------------------------------------------------------
223
+ --------------------------------------------------------------------------------------------------------
224
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
225
+ --------------------------------------------------------------------------------------------------------
226
+ ------------------------------------------------------------------------------------------
227
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
228
+ ------------------------------------------------------------------------------------------
46
229
  ---------------------------------------------------------------------------------
47
230
  ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
48
231
  ---------------------------------------------------------------------------------
232
+ ----------------------------------------------------------------------------------------------------
233
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
234
+ ----------------------------------------------------------------------------------------------------
235
+ ------------------------------------------------------------------------------------------
236
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
237
+ ------------------------------------------------------------------------------------------
49
238
  --------------------------------------------------------------------------------------------------------
50
239
  ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
51
240
  --------------------------------------------------------------------------------------------------------
241
+ ------------------------------------------------------------------------------------------------
242
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
243
+ ------------------------------------------------------------------------------------------------
244
+ ------------------------------------------------------------------------------
245
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
246
+ ------------------------------------------------------------------------------
247
+ ---------------------------------------------------------------------------------
248
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
249
+ ---------------------------------------------------------------------------------
250
+ ---------------------------------------------------------------
251
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
252
+ ---------------------------------------------------------------
253
+ ---------------------------------------------------------------
254
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
255
+ ---------------------------------------------------------------
256
+ ---------------------------------------------------------------------------------
257
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
258
+ ---------------------------------------------------------------------------------
259
+ -----------------------------------------------------------------------------------------------
260
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
261
+ -----------------------------------------------------------------------------------------------
262
+ --------------------------------------------------------------------------------------------
263
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
264
+ --------------------------------------------------------------------------------------------
265
+ --------------------------------------------------------------------------------------------------------------
266
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
267
+ --------------------------------------------------------------------------------------------------------------
52
268
  ------------------------------------------------------------------------------
53
269
  ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
54
270
  ------------------------------------------------------------------------------
271
+ ------------------------------------------------------------------------------------------
272
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
273
+ ------------------------------------------------------------------------------------------
274
+ --------------------------------------------------------------------------------------------------------
275
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
276
+ --------------------------------------------------------------------------------------------------------
55
277
  ----------------------------------------------------------------------------------------------------
56
278
  ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
57
279
  ----------------------------------------------------------------------------------------------------
280
+ ------------------------------------------------------------------------------------------------
281
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
282
+ ------------------------------------------------------------------------------------------------
283
+ --------------------------------------------------------------------------------------------------------
284
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
285
+ --------------------------------------------------------------------------------------------------------
286
+ ---------------------------------------------------------------------------------
287
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
288
+ ---------------------------------------------------------------------------------
289
+ --------------------------------------------------------------------------------------------------------
290
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
291
+ --------------------------------------------------------------------------------------------------------
292
+ -----------------------------------------------------------------------------------------------
293
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
294
+ -----------------------------------------------------------------------------------------------
58
295
  ------------------------------------------------------------------------------------------
59
296
  ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
60
297
  ------------------------------------------------------------------------------------------
298
+ ------------------------------------------------------------------------------------------------
299
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
300
+ ------------------------------------------------------------------------------------------------
301
+ ------------------------------------------------------------------------------
302
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
303
+ ------------------------------------------------------------------------------
304
+ --------------------------------------------------------------------------------------------
305
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
306
+ --------------------------------------------------------------------------------------------
307
+ --------------------------------------------------------------------------------------------------------
308
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
309
+ --------------------------------------------------------------------------------------------------------
310
+ --------------------------------------------------------------------------------------------------------------
311
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
312
+ --------------------------------------------------------------------------------------------------------------
313
+ ----------------------------------------------------------------------------------------------------
314
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
315
+ ----------------------------------------------------------------------------------------------------
316
+ ---------------------------------------------------------------
317
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
318
+ ---------------------------------------------------------------
319
+ --------------------------------------------------------------------------------------------
320
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
321
+ --------------------------------------------------------------------------------------------
322
+ ---------------------------------------------------------------------------------
323
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
324
+ ---------------------------------------------------------------------------------
325
+ --------------------------------------------------------------------------------------------------------------
326
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
327
+ --------------------------------------------------------------------------------------------------------------
328
+ -----------------------------------------------------------------------------------------------
329
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
330
+ -----------------------------------------------------------------------------------------------
331
+ ------------------------------------------------------------------------------------------
332
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
333
+ ------------------------------------------------------------------------------------------
334
+ --------------------------------------------------------------------------------------------------------
335
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
336
+ --------------------------------------------------------------------------------------------------------
337
+ ------------------------------------------------------------------------------------------------
338
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
339
+ ------------------------------------------------------------------------------------------------
340
+ --------------------------------------------------------------------------------------------------------
341
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
342
+ --------------------------------------------------------------------------------------------------------
343
+ ------------------------------------------------------------------------------
344
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
345
+ ------------------------------------------------------------------------------
346
+ ----------------------------------------------------------------------------------------------------
347
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
348
+ ----------------------------------------------------------------------------------------------------
349
+ ---------------------------------------------------------------
350
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
351
+ ---------------------------------------------------------------
352
+ --------------------------------------------------------------------------------------------------------
353
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
354
+ --------------------------------------------------------------------------------------------------------
355
+ -----------------------------------------------------------------------------------------------
356
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
357
+ -----------------------------------------------------------------------------------------------
358
+ ------------------------------------------------------------------------------
359
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
360
+ ------------------------------------------------------------------------------
361
+ --------------------------------------------------------------------------------------------------------
362
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
363
+ --------------------------------------------------------------------------------------------------------
364
+ --------------------------------------------------------------------------------------------------------------
365
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
366
+ --------------------------------------------------------------------------------------------------------------
367
+ ----------------------------------------------------------------------------------------------------
368
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
369
+ ----------------------------------------------------------------------------------------------------
370
+ --------------------------------------------------------------------------------------------
371
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
372
+ --------------------------------------------------------------------------------------------
373
+ ------------------------------------------------------------------------------------------------
374
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
375
+ ------------------------------------------------------------------------------------------------
376
+ ------------------------------------------------------------------------------------------
377
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
378
+ ------------------------------------------------------------------------------------------
379
+ ---------------------------------------------------------------------------------
380
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
381
+ ---------------------------------------------------------------------------------
382
+ ---------------------------------------------------------------
383
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
384
+ ---------------------------------------------------------------
385
+ -----------------------------------------------------------------------------------------------
386
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
387
+ -----------------------------------------------------------------------------------------------
388
+ ------------------------------------------------------------------------------------------------
389
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
390
+ ------------------------------------------------------------------------------------------------
391
+ --------------------------------------------------------------------------------------------------------------
392
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
393
+ --------------------------------------------------------------------------------------------------------------
394
+ ------------------------------------------------------------------------------
395
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
396
+ ------------------------------------------------------------------------------
397
+ ----------------------------------------------------------------------------------------------------
398
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
399
+ ----------------------------------------------------------------------------------------------------
400
+ --------------------------------------------------------------------------------------------
401
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
402
+ --------------------------------------------------------------------------------------------
403
+ --------------------------------------------------------------------------------------------------------
404
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
405
+ --------------------------------------------------------------------------------------------------------
406
+ ------------------------------------------------------------------------------------------
407
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
408
+ ------------------------------------------------------------------------------------------
409
+ ---------------------------------------------------------------------------------
410
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
411
+ ---------------------------------------------------------------------------------
412
+ --------------------------------------------------------------------------------------------------------
413
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
414
+ --------------------------------------------------------------------------------------------------------
415
+ ---------------------------------------------------------------
416
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
417
+ ---------------------------------------------------------------
418
+ ---------------------------------------------------------------
419
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
420
+ ---------------------------------------------------------------
421
+ -----------------------------------------------------------------------------------------------
422
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
423
+ -----------------------------------------------------------------------------------------------
424
+ --------------------------------------------------------------------------------------------------------------
425
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
426
+ --------------------------------------------------------------------------------------------------------------
427
+ --------------------------------------------------------------------------------------------------------
428
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
429
+ --------------------------------------------------------------------------------------------------------
430
+ --------------------------------------------------------------------------------------------------------
431
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
432
+ --------------------------------------------------------------------------------------------------------
433
+ ------------------------------------------------------------------------------------------
434
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
435
+ ------------------------------------------------------------------------------------------
436
+ ---------------------------------------------------------------------------------
437
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
438
+ ---------------------------------------------------------------------------------
439
+ ----------------------------------------------------------------------------------------------------
440
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
441
+ ----------------------------------------------------------------------------------------------------
442
+ ------------------------------------------------------------------------------
443
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
444
+ ------------------------------------------------------------------------------
445
+ ------------------------------------------------------------------------------------------------
446
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
447
+ ------------------------------------------------------------------------------------------------
448
+ --------------------------------------------------------------------------------------------
449
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
450
+ --------------------------------------------------------------------------------------------
451
+ --------------------------------------------------------------------------------------------------------------
452
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
453
+ --------------------------------------------------------------------------------------------------------------
454
+ ---------------------------------------------------------------------------------
455
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
456
+ ---------------------------------------------------------------------------------
457
+ ------------------------------------------------------------------------------------------
458
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
459
+ ------------------------------------------------------------------------------------------
460
+ ----------------------------------------------------------------------------------------------------
461
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
462
+ ----------------------------------------------------------------------------------------------------
463
+ --------------------------------------------------------------------------------------------------------
464
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
465
+ --------------------------------------------------------------------------------------------------------
466
+ -------------------------------------------------------------------------------------------------------------------------------
467
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_and_custom_error_returns_not_true
468
+ -------------------------------------------------------------------------------------------------------------------------------
469
+ ------------------------------------------------------------------------------
470
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
471
+ ------------------------------------------------------------------------------
472
+ -----------------------------------------------------------------------------------------------
473
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
474
+ -----------------------------------------------------------------------------------------------
475
+ --------------------------------------------------------------------------------------------------------
476
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
477
+ --------------------------------------------------------------------------------------------------------
478
+ ------------------------------------------------------------------------------------------------
479
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
480
+ ------------------------------------------------------------------------------------------------
481
+ --------------------------------------------------------------------------------------------
482
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
483
+ --------------------------------------------------------------------------------------------
484
+ ---------------------------------------------------------------
485
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
486
+ ---------------------------------------------------------------
487
+ --------------------------------------------------------------------------------------------------------
488
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
489
+ --------------------------------------------------------------------------------------------------------
490
+ --------------------------------------------------------------------------------------------------------------
491
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
492
+ --------------------------------------------------------------------------------------------------------------
493
+ --------------------------------------------------------------------------------------------------------
494
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
495
+ --------------------------------------------------------------------------------------------------------
496
+ ------------------------------------------------------------------------------------------
497
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
498
+ ------------------------------------------------------------------------------------------
499
+ ------------------------------------------------------------------------------------------------
500
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
501
+ ------------------------------------------------------------------------------------------------
502
+ -------------------------------------------------------------------------------------------------------------------------------
503
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_and_custom_error_returns_not_true
504
+ -------------------------------------------------------------------------------------------------------------------------------
505
+ ---------------------------------------------------------------------------------
506
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
507
+ ---------------------------------------------------------------------------------
508
+ ------------------------------------------------------------------------------
509
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
510
+ ------------------------------------------------------------------------------
511
+ --------------------------------------------------------------------------------------------
512
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
513
+ --------------------------------------------------------------------------------------------
514
+ -----------------------------------------------------------------------------------------------
515
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
516
+ -----------------------------------------------------------------------------------------------
517
+ ----------------------------------------------------------------------------------------------------
518
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
519
+ ----------------------------------------------------------------------------------------------------
520
+ ---------------------------------------------------------------
521
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
522
+ ---------------------------------------------------------------
523
+ --------------------------------------------------------------------------------------------------------
524
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
525
+ --------------------------------------------------------------------------------------------------------
526
+ ----------------------------------------------------------------------------------------------------
527
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
528
+ ----------------------------------------------------------------------------------------------------
529
+ ------------------------------------------------------------------------------------------------
530
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
531
+ ------------------------------------------------------------------------------------------------
532
+ ------------------------------------------------------------------------------------------
533
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
534
+ ------------------------------------------------------------------------------------------
535
+ -------------------------------------------------------------------------------------------------------------------------------
536
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_and_custom_error_returns_not_true
537
+ -------------------------------------------------------------------------------------------------------------------------------
538
+ -----------------------------------------------------------------------------------------------
539
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
540
+ -----------------------------------------------------------------------------------------------
541
+ --------------------------------------------------------------------------------------------------------------
542
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
543
+ --------------------------------------------------------------------------------------------------------------
544
+ --------------------------------------------------------------------------------------------
545
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
546
+ --------------------------------------------------------------------------------------------
547
+ --------------------------------------------------------------------------------------------------------
548
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
549
+ --------------------------------------------------------------------------------------------------------
550
+ ------------------------------------------------------------------------------
551
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
552
+ ------------------------------------------------------------------------------
553
+ ---------------------------------------------------------------------------------
554
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
555
+ ---------------------------------------------------------------------------------
556
+ ---------------------------------------------------------------
557
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
558
+ ---------------------------------------------------------------
559
+ --------------------------------------------------------------------------------------------
560
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
561
+ --------------------------------------------------------------------------------------------
562
+ ----------------------------------------------------------------------------------------------------
563
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
564
+ ----------------------------------------------------------------------------------------------------
565
+ ------------------------------------------------------------------------------------------
566
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
567
+ ------------------------------------------------------------------------------------------
568
+ -------------------------------------------------------------------------------------------------------------------------------
569
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_and_custom_error_returns_not_true
570
+ -------------------------------------------------------------------------------------------------------------------------------
571
+ --------------------------------------------------------------------------------------------------------------
572
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
573
+ --------------------------------------------------------------------------------------------------------------
574
+ -----------------------------------------------------------------------------------------------
575
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
576
+ -----------------------------------------------------------------------------------------------
577
+ --------------------------------------------------------------------------------------------------------
578
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
579
+ --------------------------------------------------------------------------------------------------------
580
+ ------------------------------------------------------------------------------------------------
581
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
582
+ ------------------------------------------------------------------------------------------------
583
+ --------------------------------------------------------------------------------------------------------
584
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
585
+ --------------------------------------------------------------------------------------------------------
586
+ ------------------------------------------------------------------------------
587
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
588
+ ------------------------------------------------------------------------------
589
+ ---------------------------------------------------------------------------------
590
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
591
+ ---------------------------------------------------------------------------------
592
+ ---------------------------------------------------------------
593
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
594
+ ---------------------------------------------------------------
595
+ ---------------------------------------------------------------
596
+ WelcomeControllerTest: test_controller_has_a_#authorize!_method
597
+ ---------------------------------------------------------------
598
+ -------------------------------------------------------------------------------------------------------------------------
599
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_and_custom_error_returns_not_true
600
+ -------------------------------------------------------------------------------------------------------------------------
601
+ ------------------------------------------------------------------------------
602
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
603
+ ------------------------------------------------------------------------------
604
+ ------------------------------------------------------------------------------------------
605
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
606
+ ------------------------------------------------------------------------------------------
607
+ --------------------------------------------------------------------------------------------------------
608
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
609
+ --------------------------------------------------------------------------------------------------------
610
+ ----------------------------------------------------------------------------------------------------
611
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
612
+ ----------------------------------------------------------------------------------------------------
613
+ -------------------------------------------------------------------------------------------------------------------------------
614
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_and_custom_error_returns_not_true
615
+ -------------------------------------------------------------------------------------------------------------------------------
616
+ ---------------------------------------------------------------------------------
617
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
618
+ ---------------------------------------------------------------------------------
619
+ --------------------------------------------------------------------------------------------------------
620
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
621
+ --------------------------------------------------------------------------------------------------------
622
+ --------------------------------------------------------------------------------------------------------------
623
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
624
+ --------------------------------------------------------------------------------------------------------------
625
+ -----------------------------------------------------------------------------------------------
626
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
627
+ -----------------------------------------------------------------------------------------------
628
+ ------------------------------------------------------------------------------------------------
629
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
630
+ ------------------------------------------------------------------------------------------------
631
+ --------------------------------------------------------------------------------------------
632
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
633
+ --------------------------------------------------------------------------------------------
61
634
  ---------------------------------------------------------------
62
635
  WelcomeControllerTest: test_controller_has_a_#authorize!_method
63
636
  ---------------------------------------------------------------
637
+ ------------------------------------------------------------------------------------------------
638
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_returns_not_true
639
+ ------------------------------------------------------------------------------------------------
640
+ -----------------------------------------------------------------------------------------------
641
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_with_argument_returns_true
642
+ -----------------------------------------------------------------------------------------------
643
+ ---------------------------------------------------------------------------------
644
+ ActionControlTest: test_should_raise_no_exception_if_#authenticated?_returns_true
645
+ ---------------------------------------------------------------------------------
646
+ ------------------------------------------------------------------------------------------
647
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_returns_not_true
648
+ ------------------------------------------------------------------------------------------
649
+ -------------------------------------------------------------------------------------------------------------------------
650
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_and_custom_error_returns_not_true
651
+ -------------------------------------------------------------------------------------------------------------------------
652
+ --------------------------------------------------------------------------------------------------------
653
+ ActionControlTest: test_should_raise_`AuthenticationNotPerformedError`_if_#authenticated?_is_not_defined
654
+ --------------------------------------------------------------------------------------------------------
655
+ -------------------------------------------------------------------------------------------------------------------------------
656
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_and_custom_error_returns_not_true
657
+ -------------------------------------------------------------------------------------------------------------------------------
658
+ --------------------------------------------------------------------------------------------------------------
659
+ ActionControlTest: test_should_raise_`NotAuthenticatedError`_if_#authenticated?_with_argument_returns_not_true
660
+ --------------------------------------------------------------------------------------------------------------
661
+ ------------------------------------------------------------------------------
662
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_returns_true
663
+ ------------------------------------------------------------------------------
664
+ ----------------------------------------------------------------------------------------------------
665
+ ActionControlTest: test_should_raise_`AuthorizationNotPerformedError`_if_#authorized?_is_not_defined
666
+ ----------------------------------------------------------------------------------------------------
667
+ --------------------------------------------------------------------------------------------
668
+ ActionControlTest: test_should_raise_no_exception_if_#authorized?_with_argument_returns_true
669
+ --------------------------------------------------------------------------------------------
670
+ --------------------------------------------------------------------------------------------------------
671
+ ActionControlTest: test_should_raise_`NotAuthorizedError`_if_#authorized?_with_argument_returns_not_true
672
+ --------------------------------------------------------------------------------------------------------
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_control
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Feistmantl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-08 00:00:00.000000000 Z
11
+ date: 2017-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails