Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-05-07 13:52:07 +0400
committerMarin Jankovski <marin@gitlab.com>2014-05-07 13:52:07 +0400
commit99e0d0dd6f9d1a6b66c5322f142e6dd008f62ebd (patch)
tree2134cad4d0c4834eeb80966cb4d4ce6815588f22 /features
parente026491d533d96d58a98ac9dcb13f0b710c689a4 (diff)
Unstub after the test is done.
Diffstat (limited to 'features')
-rw-r--r--features/project/wiki.feature12
-rw-r--r--features/steps/project/wiki.rb2
2 files changed, 8 insertions, 6 deletions
diff --git a/features/project/wiki.feature b/features/project/wiki.feature
index 41c51f2c42e..4a8c771ddac 100644
--- a/features/project/wiki.feature
+++ b/features/project/wiki.feature
@@ -46,6 +46,12 @@ Feature: Project Wiki
And I click on the "Pages" button
Then I should see the existing page in the pages list
+ Scenario: File exists in wiki repo
+ Given I have an existing Wiki page with images linked on page
+ And I browse to wiki page with images
+ And I click on existing image link
+ Then I should see the image from wiki repo
+
Scenario: Image in wiki repo shown on the page
Given I have an existing Wiki page with images linked on page
And I browse to wiki page with images
@@ -56,9 +62,3 @@ Feature: Project Wiki
And I browse to wiki page with images
And I click on image link
Then I should see the new wiki page form
-
- Scenario: File exists in wiki repo
- Given I have an existing Wiki page with images linked on page
- And I browse to wiki page with images
- And I click on existing image link
- Then I should see the image from wiki repo
diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb
index 3244a5a05af..96f2505d24c 100644
--- a/features/steps/project/wiki.rb
+++ b/features/steps/project/wiki.rb
@@ -107,6 +107,8 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
url = URI.parse(current_url)
url.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)
end
Then 'Image should be shown on the page' do