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 @@ -383,12 +383,37 @@ def test_fail_calling_use_adapter_on_controller_instance
383
383
}
384
384
end
385
385
386
- def test_fail_calling_get_serializer__on_controller_instance
386
+ # FIXME: Test is currently failing
387
+ def test_fail_calling_use_adapter_on_controller_that_overrides_use_adapter
388
+ controller = Class . new ( ImplicitSerializationTestController ) {
389
+ def use_adapter?
390
+ false
391
+ end
392
+ } . new
393
+ assert_raises ( ActiveModel ::Serializer ::Error ) {
394
+ controller . use_adapter?
395
+ }
396
+ end
397
+
398
+ def test_fail_calling_get_serializer_on_controller_instance
387
399
controller = ImplicitSerializationTestController . new
388
400
assert_raises ( ActiveModel ::Serializer ::Error ) {
389
401
controller . get_serializer ( Class . new )
390
402
}
391
403
end
404
+
405
+
406
+ # FIXME: Test is currently failing
407
+ def test_fail_calling_get_serializer_on_controller_instance_that_overrides_get_serializer
408
+ controller = Class . new ( ImplicitSerializationTestController ) {
409
+ def get_serializer ( resource )
410
+ self
411
+ end
412
+ } . new
413
+ assert_raises ( ActiveModel ::Serializer ::Error ) {
414
+ controller . get_serializer ( Class . new )
415
+ }
416
+ end
392
417
end
393
418
end
394
419
end
You can’t perform that action at this time.
0 commit comments