Skip to content

Commit 5a26c1e

Browse files
committed
Added test for --disable-user-triggers with --defer-constraints
1 parent 4d45712 commit 5a26c1e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/sync_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ def test_disable_user_triggers
156156
assert_equal [{"name" => "Test"}], conn2.exec("SELECT name FROM robots ORDER BY id").to_a
157157
end
158158

159+
def test_disable_user_triggers_defer_constraints
160+
insert(conn1, "robots", [{"name" => "Test"}])
161+
assert_works "robots --disable-user-triggers --defer-constraints", config: true
162+
assert_equal [{"name" => "Test"}], conn2.exec("SELECT name FROM robots ORDER BY id").to_a
163+
end
164+
159165
def test_disable_integrity
160166
insert(conn1, "posts", [{"id" => 1}])
161167
insert(conn1, "comments", [{"post_id" => 1}])

0 commit comments

Comments
 (0)