diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2014-11-16 23:44:46 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2014-11-20 03:00:42 -0700 |
| commit | 9f706c5dada98733eb0c252200f9fe6aae14c739 (patch) | |
| tree | 97f374216fab5ad8a65facd3188f4034160a6da8 /test/paths_test.rb | |
| parent | 0d93b37ffc4782ed338162da03b40566097ef048 (diff) | |
resolves #1192 preserve URI targets universally
- preserve URI targets universally by moving logic to normalize_web_path
- remove pre-checks for URI whereever normalize_web_path is used
Diffstat (limited to 'test/paths_test.rb')
| -rw-r--r-- | test/paths_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/paths_test.rb b/test/paths_test.rb index f6238f22..d47b951d 100644 --- a/test/paths_test.rb +++ b/test/paths_test.rb @@ -56,6 +56,16 @@ context 'Path Resolver' do assert_equal 'http://www.example.com/assets/images', @resolver.web_path('images', 'http://www.example.com/assets') end + # enable if we want to allow web_path to detect and preserve a target URI + #test 'target with file url appended to relative path' do + # assert_equal 'file:///home/username/styles/asciidoctor.css', @resolver.web_path('file:///home/username/styles/asciidoctor.css', '.') + #end + + # enable if we want to allow web_path to detect and preserve a target URI + #test 'target with http url appended to relative path' do + # assert_equal 'http://example.com/asciidoctor.css', @resolver.web_path('http://example.com/asciidoctor.css', '.') + #end + test 'normalize target' do assert_equal '../images', @resolver.web_path('../images/../images') end |
