Skip to content

Commit 27a570f

Browse files
committed
fix(test): test_payload_name_on_eager_load
1 parent a279ab1 commit 27a570f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
require "support/copy_cat"
2+
3+
# We override this test since in our codebase, there is a SCHEMA call
4+
# made with `SHOW max_identifier_length`.
5+
# TODO: We should however inspect why that is.
6+
#
7+
# See https://github.com/cockroachdb/activerecord-cockroachdb-adapter/issues/392
8+
#
9+
# From: notification.first
10+
# To: notification.last
11+
CopyCat.copy_methods(self, self, :test_payload_name_on_eager_load) do
12+
def on_send(node)
13+
return super unless node in [:send, [:lvar, :notification], :first]
14+
replace(node.loc.expression, "notification.last")
15+
end
16+
end

0 commit comments

Comments
 (0)