Skip to content

Commit

Permalink
[webui] test http:// and https:// links in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed May 5, 2015
1 parent 2adef17 commit 4b0fb99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/test/functional/webui/package_controller_test.rb
Expand Up @@ -91,7 +91,7 @@ def fill_comment(body = 'Comment Body')
use_js
login_Iggy
visit root_path + '/package/show/home:Iggy/TestPack'
fill_comment "Write some http://link.com\n\nand some other\n\n* Markdown\n* markup\n\nReferencing sr#23, bco#24, fate#25, @_nobody_, @a-dashed-user and @Iggy."
fill_comment "Write some http://link.com\n\nand some other\n\n* Markdown\n* markup\n\nReferencing sr#23, bco#24, fate#25, @_nobody_, @a-dashed-user and @Iggy. https://anotherlink.com"
within('div.comment_0') do
page.must_have_link "http://link.com"
page.must_have_xpath '//ul//li[text()="Markdown"]'
Expand All @@ -102,6 +102,8 @@ def fill_comment(body = 'Comment Body')
page.must_have_xpath '//a[contains(@href, "user/show/_nobody_") and text()="@_nobody_"]'
page.must_have_xpath '//a[contains(@href, "user/show/a-dashed-user") and text()="@a-dashed-user"]'
page.must_have_xpath '//a[contains(@href, "user/show/Iggy") and text()="@Iggy"]'
page.must_have_xpath '//a[@href="http://link.com"]'
page.must_have_xpath '//a[@href="https://anotherlink.com"]'
end
end

Expand Down

0 comments on commit 4b0fb99

Please sign in to comment.