You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/frameworks/rails5x_test.rb
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,8 @@
102
102
traces[4]['Layer'].must_equal"activerecord"
103
103
traces[4]['Label'].must_equal"entry"
104
104
traces[4]['Flavor'].must_equal"postgresql"
105
-
traces[4]['Query'].must_equal"SELECT \"widgets\".* FROM \"widgets\" WHERE \"widgets\".\"name\" = $? ORDER BY \"widgets\".\"id\" ASC LIMIT $?"
105
+
# using match because there is a 1 space difference between Rails 5 and Rails 6
106
+
traces[4]['Query'].must_match/SELECT\s{1,2}\"widgets\".* FROM \"widgets\" WHERE \"widgets\".\"name\" = \$\? ORDER BY \"widgets\".\"id\" ASC LIMIT \$\?/
106
107
traces[4]['Name'].must_equal"Widget Load"
107
108
traces[4].key?('Backtrace').must_equalfalse
108
109
traces[4].key?('QueryArgs').must_equalfalse
@@ -161,7 +162,8 @@
161
162
162
163
entry_traces[3]['Layer'].must_equal"activerecord"
163
164
entry_traces[3]['Flavor'].must_equal"mysql"
164
-
entry_traces[3]['Query'].must_equal"SELECT `widgets`.* FROM `widgets` WHERE `widgets`.`name` = 'blah' ORDER BY `widgets`.`id` ASC LIMIT 1"
165
+
# using match because there is a 1 space difference between Rails 5 and Rails 6
166
+
entry_traces[3]['Query'].must_match/SELECT\s{1,2}`widgets`.* FROM `widgets` WHERE `widgets`.`name` = 'blah' ORDER BY `widgets`.`id` ASC LIMIT 1/
0 commit comments