@@ -864,6 +864,8 @@ def test_insert_all_when_table_name_contains_database
864
864
end
865
865
866
866
def test_insert_all_with_unpersisted_records_triggers_deprecation
867
+ skip unless supports_insert_on_duplicate_skip?
868
+
867
869
author = Author . create! ( name : "Rafael" )
868
870
author . books . build ( title : "Unpersisted Book" )
869
871
@@ -876,6 +878,8 @@ def test_insert_all_with_unpersisted_records_triggers_deprecation
876
878
end
877
879
878
880
def test_insert_all_without_unpersisted_records_has_no_deprecation
881
+ skip unless supports_insert_on_duplicate_skip?
882
+
879
883
author = Author . create! ( name : "Rafael" )
880
884
881
885
assert_not_deprecated ( ActiveRecord . deprecator ) do
@@ -884,6 +888,8 @@ def test_insert_all_without_unpersisted_records_has_no_deprecation
884
888
end
885
889
886
890
def test_insert_with_unpersisted_records_triggers_deprecation
891
+ skip unless supports_insert_on_duplicate_skip?
892
+
887
893
author = Author . create! ( name : "Rafael" )
888
894
author . books . build ( title : "Unpersisted Book" )
889
895
@@ -896,6 +902,8 @@ def test_insert_with_unpersisted_records_triggers_deprecation
896
902
end
897
903
898
904
def test_insert_without_unpersisted_records_has_no_deprecation
905
+ skip unless supports_insert_on_duplicate_skip?
906
+
899
907
author = Author . create! ( name : "Rafael" )
900
908
901
909
assert_not_deprecated ( ActiveRecord . deprecator ) do
@@ -924,6 +932,8 @@ def test_insert_all_bang_without_unpersisted_records_has_no_deprecation
924
932
end
925
933
926
934
def test_upsert_all_with_unpersisted_record_triggers_deprecation
935
+ skip unless supports_insert_on_duplicate_update?
936
+
927
937
author = Author . create! ( name : "Rafael" )
928
938
author . books . build ( title : "Unpersisted Book" )
929
939
@@ -936,6 +946,8 @@ def test_upsert_all_with_unpersisted_record_triggers_deprecation
936
946
end
937
947
938
948
def test_upsert_all_without_unpersisted_records_has_no_deprecation
949
+ skip unless supports_insert_on_duplicate_update?
950
+
939
951
author = Author . create! ( name : "Rafael" )
940
952
941
953
assert_not_deprecated ( ActiveRecord . deprecator ) do
@@ -944,6 +956,8 @@ def test_upsert_all_without_unpersisted_records_has_no_deprecation
944
956
end
945
957
946
958
def test_upsert_with_unpersisted_record_triggers_deprecation
959
+ skip unless supports_insert_on_duplicate_update?
960
+
947
961
author = Author . create! ( name : "Rafael" )
948
962
author . books . build ( title : "Unpersisted Book" )
949
963
@@ -956,6 +970,8 @@ def test_upsert_with_unpersisted_record_triggers_deprecation
956
970
end
957
971
958
972
def test_upsert_without_unpersisted_records_has_no_deprecation
973
+ skip unless supports_insert_on_duplicate_update?
974
+
959
975
author = Author . create! ( name : "Rafael" )
960
976
961
977
assert_not_deprecated ( ActiveRecord . deprecator ) do
0 commit comments