diff options
author | w0rp <devw0rp@gmail.com> | 2017-09-13 23:33:13 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-09-13 23:33:13 +0100 |
commit | 52c933cd72ca283eb5ac8542ab10c78ca50bf7cb (patch) | |
tree | a8b3eaa4075257358db0ecb999eebc7fe0c797e4 /test | |
parent | 3d2bddf4af7515a6f2b20cf6b5bb8fa5568a1a99 (diff) | |
download | ale-52c933cd72ca283eb5ac8542ab10c78ca50bf7cb.zip |
Report problems in other files for brakeman, and get the tests to pass on Windows
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_brakeman_handler.vader | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/handler/test_brakeman_handler.vader b/test/handler/test_brakeman_handler.vader index 02d70234..5a398799 100644 --- a/test/handler/test_brakeman_handler.vader +++ b/test/handler/test_brakeman_handler.vader @@ -1,6 +1,5 @@ Before: call ale#test#SetDirectory('/testplugin/test/handler') - cd .. runtime ale_linters/ruby/brakeman.vim @@ -9,16 +8,18 @@ After: call ale#linter#Reset() Execute(The brakeman handler should parse JSON correctly): - call ale#test#SetFilename('ruby_fixtures/valid_rails_app/app/models/thing.rb') + call ale#test#SetFilename('../ruby_fixtures/valid_rails_app/app/models/thing.rb') AssertEqual \ [ \ { + \ 'filename': expand('%:p'), \ 'lnum': 84, \ 'text': 'SQL Injection Possible SQL injection (Medium)', \ 'type': 'W', \ }, \ { + \ 'filename': expand('%:p'), \ 'lnum': 1, \ 'text': 'Mass Assignment Potentially dangerous attribute available for mass assignment (Weak)', \ 'type': 'W', @@ -33,7 +34,7 @@ Execute(The brakeman handler should parse JSON correctly): \ '"fingerprint": "1234",', \ '"check_name": "SQL",', \ '"message": "Possible SQL injection",', - \ '"file": "app/models/thing.rb",', + \ '"file": "' . substitute(ale#path#Winify('app/models/thing.rb'), '\\', '\\\\', 'g') . '",', \ '"line": 84,', \ '"link": "http://brakemanscanner.org/docs/warning_types/sql_injection/",', \ '"code": "Thing.connection.execute(params[:data])",', @@ -52,7 +53,7 @@ Execute(The brakeman handler should parse JSON correctly): \ '"fingerprint": "1235",', \ '"check_name": "ModelAttrAccessible",', \ '"message": "Potentially dangerous attribute available for mass assignment",', - \ '"file": "app/models/thing.rb",', + \ '"file": "' . substitute(ale#path#Winify('app/models/thing.rb'), '\\', '\\\\', 'g') . '",', \ '"line": null,', \ '"link": "http://brakemanscanner.org/docs/warning_types/mass_assignment/",', \ '"code": ":name",', |