提交 92dc97c9 编写于 作者: J Justin Collins

Add test for Model#arel_table

上级 0277eefd
......@@ -41,4 +41,8 @@ class OtherController < ApplicationController
@user = User.find(current_user)
@greeting = "Hello, #{greeted += 1; @user.name}!"
end
def test_arel_table_access
User.where(User.arel_table[:id].eq(params[:some_id]))
end
end
......@@ -622,4 +622,13 @@ class Rails31Tests < Test::Unit::TestCase
:line => 1,
:file => /json_test\.html\.erb/
end
def test_arel_table_in_sql
assert_no_warning :type => :warning,
:warning_type => "SQL Injection",
:line => 46,
:message => /^Possible\ SQL\ injection/,
:confidence => 0,
:file => /other_controller\.rb/
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册