diff options
author | Michiaki Ariga <chezou+github@gmail.com> | 2016-02-18 17:49:57 +0900 |
---|---|---|
committer | Michiaki Ariga <chezou+github@gmail.com> | 2016-02-18 18:35:30 +0900 |
commit | 25dbfba26343f04f0eb978852ad0dc80a18aedc5 (patch) | |
tree | 74a5a49c12dea3ec210eeac193456a6321de7645 /actionview/test/template/digestor_test.rb | |
parent | 00b62719b4ff4fe4e60b00ba46c03cc6209b1f40 (diff) | |
download | rails-25dbfba26343f04f0eb978852ad0dc80a18aedc5.tar.gz rails-25dbfba26343f04f0eb978852ad0dc80a18aedc5.tar.bz2 rails-25dbfba26343f04f0eb978852ad0dc80a18aedc5.zip |
Add assertions order by field with empty data
Add assertions to MySQL `ORDER BY FIELD()` with empty data.
These tests examine to sanitize `ORDER BY FIELD()` with empty data
appropriately.
```ruby
Tag.order(['field(id, ?)', []]).to_sql
# => SELECT "tags".* FROM "tags" ORDER BY field(id, NULL)
Tag.order(['field(id, ?)', nil]).to_sql
# => SELECT "tags".* FROM "tags" ORDER BY field(id, NULL)
```
Diffstat (limited to 'actionview/test/template/digestor_test.rb')
0 files changed, 0 insertions, 0 deletions