diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2014-09-23 22:14:17 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2014-09-23 22:14:17 +0200 |
commit | 6da15541d3d3844a07bfa2a2495fdc3c09ce5191 (patch) | |
tree | e6d8d98a4529f30aab06421ecabe6704cc5982d6 /features | |
parent | 3c9ea7f4a90a4d3902b36a94678f6f39c1a1cc61 (diff) | |
parent | b095c1a44eda0ea599795859639e50f7c89e448f (diff) | |
download | gitlab-ce-6da15541d3d3844a07bfa2a2495fdc3c09ce5191.tar.gz |
Merge pull request #7833 from cirosantilli/wiki-cur-url
Factor current_url + URI.path into current_path.
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/project/wiki.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index 85375818d47..aa00818c602 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -11,8 +11,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I should be redirected back to the Edit Home Wiki page' do - url = URI.parse(current_url) - url.path.should == project_wiki_path(project, :home) + current_path.should == project_wiki_path(project, :home) end step 'I create the Wiki Home page' do @@ -51,8 +50,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I should be redirected back to that Wiki page' do - url = URI.parse(current_url) - url.path.should == project_wiki_path(project, @page) + current_path.should == project_wiki_path(project, @page) end step 'That page has two revisions' do @@ -104,8 +102,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I should see the image from wiki repo' do - url = URI.parse(current_url) - url.path.should match("wikis/image.jpg") + current_path.should match('wikis/image.jpg') page.should_not have_xpath('/html') # Page should render the image which means there is no html involved Gollum::Wiki.any_instance.unstub(:file) Gollum::File.any_instance.unstub(:mime_type) @@ -121,8 +118,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I should see the new wiki page form' do - url = URI.parse(current_url) - url.path.should match("wikis/image.jpg") + current_path.should match('wikis/image.jpg') page.should have_content('New Wiki Page') page.should have_content('Editing - image.jpg') end |