diff options
author | Stan Hu <stanhu@gmail.com> | 2015-04-07 18:58:12 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-04-07 19:10:11 +0300 |
commit | 3143edfea6b71a6a26470e3f4a9cffa773f584ec (patch) | |
tree | 54988bcedb2d9300e40803c71498f36602c9496a /features/steps/project/wiki.rb | |
parent | 7feec5fe051172ee055f3c82da22b1b330e13c74 (diff) |
Fix bug where Wiki pages that include a '/' were no longer accessible
Closes #1363
Diffstat (limited to 'features/steps/project/wiki.rb')
-rw-r--r-- | features/steps/project/wiki.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index cd7d5eac243..bb93e582a1f 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -3,6 +3,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps include SharedProject include SharedNote include SharedPaths + include WikiHelper step 'I click on the Cancel button' do within(:css, ".form-actions") do @@ -123,6 +124,41 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps page.should have_content('Editing - image.jpg') end + step 'I create a New page with paths' do + click_on 'New Page' + fill_in 'Page slug', with: 'one/two/three' + click_on 'Build' + fill_in "wiki_content", with: 'wiki content' + click_on "Create page" + current_path.should include 'one/two/three' + end + + step 'I should see non-escaped link in the pages list' do + page.should have_xpath("//a[@href='/#{project.path_with_namespace}/wikis/one/two/three']") + end + + step 'I edit the Wiki page with a path' do + click_on 'three' + click_on 'Edit' + end + + step 'I should see a non-escaped path' do + current_path.should include 'one/two/three' + end + + step 'I should see the Editing page' do + page.should have_content('Editing') + end + + step 'I view the page history of a Wiki page that has a path' do + click_on 'three' + click_on 'Page History' + end + + step 'I should see the page history' do + page.should have_content('History for') + end + def wiki @project_wiki = ProjectWiki.new(project, current_user) end |