-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make odr legal link clickable in impressum, closes #1508
- Loading branch information
1 parent
ab56531
commit da952a5
Showing
4 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2012-2017, Fairmondo eG. This file is | ||
# licensed under the GNU Affero General Public License version 3 or later. | ||
# See the COPYRIGHT file for details. | ||
|
||
require_relative '../test_helper' | ||
|
||
describe ApplicationHelper do | ||
describe 'clickable_legal_links' do | ||
it 'should put a link around an ODR URL' do | ||
html = '<p>Please read http://ec.europa.eu/odr for legal stuff on online stores.</p>' | ||
expected = '<p>Please read <a href="http://ec.europa.eu/odr" target="_blank">http://ec.europa.eu/odr</a> for legal stuff on online stores.</p>' | ||
assert_equal(expected, helper.clickable_legal_links(html)) | ||
end | ||
|
||
it 'should put no link around other URLs' do | ||
html = '<p>Please also look at http://forbidden.website.com</p>' | ||
expected = '<p>Please also look at http://forbidden.website.com</p>' | ||
assert_equal(expected, helper.clickable_legal_links(html)) | ||
end | ||
end | ||
end |