Skip to content

Commit 155b64d

Browse files
committed
Ruby: Add test for render calls
1 parent b7e1431 commit 155b64d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ruby/ql/test/library-tests/frameworks/action_controller/ActionController.expected

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,12 @@ redirectToCalls
254254
| controllers/foo/bars_controller.rb:17:5:17:30 | call to redirect_to |
255255
| controllers/foo/bars_controller.rb:27:5:27:39 | call to redirect_back_or_to |
256256
| controllers/foo/bars_controller.rb:31:5:31:56 | call to redirect_back |
257+
renderCalls
258+
| controllers/foo/bars_controller.rb:6:5:6:37 | call to render |
259+
| controllers/foo/bars_controller.rb:23:5:23:76 | call to render |
260+
| controllers/foo/bars_controller.rb:35:5:35:33 | call to render |
261+
| controllers/foo/bars_controller.rb:38:5:38:50 | call to render |
262+
| controllers/foo/bars_controller.rb:44:5:44:17 | call to render |
257263
actionControllerHelperMethods
258264
getAssociatedControllerClasses
259265
controllerTemplateFiles

ruby/ql/test/library-tests/frameworks/action_controller/ActionController.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ query predicate cookiesSources(CookiesSource src) { any() }
2323

2424
query predicate redirectToCalls(RedirectToCall c) { any() }
2525

26+
query predicate renderCalls(Rails::RenderCall c) { any() }
27+
2628
query predicate actionControllerHelperMethods(ActionControllerHelperMethod m) { any() }
2729

2830
query predicate getAssociatedControllerClasses(ActionControllerClass cls, ErbFile f) {

0 commit comments

Comments
 (0)