File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -335,12 +335,37 @@ def test_fail_calling_use_adapter_on_controller_instance
335
335
}
336
336
end
337
337
338
- def test_fail_calling_get_serializer__on_controller_instance
338
+ # FIXME: Test is currently failing
339
+ def test_fail_calling_use_adapter_on_controller_that_overrides_use_adapter
340
+ controller = Class . new ( ImplicitSerializationTestController ) {
341
+ def use_adapter?
342
+ false
343
+ end
344
+ } . new
345
+ assert_raises ( ActiveModel ::Serializer ::Error ) {
346
+ controller . use_adapter?
347
+ }
348
+ end
349
+
350
+ def test_fail_calling_get_serializer_on_controller_instance
339
351
controller = ImplicitSerializationTestController . new
340
352
assert_raises ( ActiveModel ::Serializer ::Error ) {
341
353
controller . get_serializer ( Class . new )
342
354
}
343
355
end
356
+
357
+
358
+ # FIXME: Test is currently failing
359
+ def test_fail_calling_get_serializer_on_controller_instance_that_overrides_get_serializer
360
+ controller = Class . new ( ImplicitSerializationTestController ) {
361
+ def get_serializer ( resource )
362
+ self
363
+ end
364
+ } . new
365
+ assert_raises ( ActiveModel ::Serializer ::Error ) {
366
+ controller . get_serializer ( Class . new )
367
+ }
368
+ end
344
369
end
345
370
end
346
371
end
You can’t perform that action at this time.
0 commit comments