diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-05-23 14:58:34 +0400 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-05-26 22:43:58 +0400 |
commit | 281643a1bfd6f4da88a278bfce20133c80105de5 (patch) | |
tree | 2b7cd19a1ad517a1e33292044eba1c994aa7a1de /features | |
parent | 603e04bc21b07b8b6f70e972383ea2f29d0bfce0 (diff) |
Add feature spec.
Diffstat (limited to 'features')
-rw-r--r-- | features/project/issues/issues.feature | 6 | ||||
-rw-r--r-- | features/steps/project/issues.rb | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature index c5311544efa..191e8dcbe7f 100644 --- a/features/project/issues/issues.feature +++ b/features/project/issues/issues.feature @@ -68,6 +68,12 @@ Feature: Project Issues And I leave a comment with a header containing "Comment with a header" Then The comment with the header should not have an ID + @javascript + Scenario: Blocks inside comments should not build relative links + Given I visit issue page "Release 0.4" + And I leave a comment with code block + Then The code block should be unchanged + Scenario: Issues on empty project Given empty project "Empty Project" When I visit empty project page diff --git a/features/steps/project/issues.rb b/features/steps/project/issues.rb index d1f3ba25a21..d0b4aa6e080 100644 --- a/features/steps/project/issues.rb +++ b/features/steps/project/issues.rb @@ -163,4 +163,16 @@ class ProjectIssues < Spinach::FeatureSteps project = Project.find_by(name: 'Empty Project') visit project_issues_path(project) end + + step 'I leave a comment with code block' do + within(".js-main-target-form") do + fill_in "note[note]", with: "```\nCommand [1]: /usr/local/bin/git , see [text](doc/text)\n```" + click_button "Add Comment" + sleep 0.05 + end + end + + step 'The code block should be unchanged' do + page.should have_content("```\nCommand [1]: /usr/local/bin/git , see [text](doc/text)\n```") + end end |