Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
6da15541
Commit
6da15541
authored
Sep 23, 2014
by
Robert Schilling
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7833 from cirosantilli/wiki-cur-url
Factor current_url + URI.path into current_path.
parents
3c9ea7f4
b095c1a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
features/steps/project/wiki.rb
features/steps/project/wiki.rb
+4
-8
No files found.
features/steps/project/wiki.rb
View file @
6da15541
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment