Commit 99e0d0dd6f9d1a6b66c5322f142e6dd008f62ebd
1 parent
e026491d
Exists in
spb-stable
and in
2 other branches
Unstub after the test is done.
Showing
2 changed files
with
8 additions
and
6 deletions
Show diff stats
features/project/wiki.feature
@@ -46,6 +46,12 @@ Feature: Project Wiki | @@ -46,6 +46,12 @@ Feature: Project Wiki | ||
46 | And I click on the "Pages" button | 46 | And I click on the "Pages" button |
47 | Then I should see the existing page in the pages list | 47 | Then I should see the existing page in the pages list |
48 | 48 | ||
49 | + Scenario: File exists in wiki repo | ||
50 | + Given I have an existing Wiki page with images linked on page | ||
51 | + And I browse to wiki page with images | ||
52 | + And I click on existing image link | ||
53 | + Then I should see the image from wiki repo | ||
54 | + | ||
49 | Scenario: Image in wiki repo shown on the page | 55 | Scenario: Image in wiki repo shown on the page |
50 | Given I have an existing Wiki page with images linked on page | 56 | Given I have an existing Wiki page with images linked on page |
51 | And I browse to wiki page with images | 57 | And I browse to wiki page with images |
@@ -56,9 +62,3 @@ Feature: Project Wiki | @@ -56,9 +62,3 @@ Feature: Project Wiki | ||
56 | And I browse to wiki page with images | 62 | And I browse to wiki page with images |
57 | And I click on image link | 63 | And I click on image link |
58 | Then I should see the new wiki page form | 64 | Then I should see the new wiki page form |
59 | - | ||
60 | - Scenario: File exists in wiki repo | ||
61 | - Given I have an existing Wiki page with images linked on page | ||
62 | - And I browse to wiki page with images | ||
63 | - And I click on existing image link | ||
64 | - Then I should see the image from wiki repo |
features/steps/project/wiki.rb
@@ -107,6 +107,8 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps | @@ -107,6 +107,8 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps | ||
107 | url = URI.parse(current_url) | 107 | url = URI.parse(current_url) |
108 | url.path.should match("wikis/image.jpg") | 108 | url.path.should match("wikis/image.jpg") |
109 | page.should_not have_xpath('/html') # Page should render the image which means there is no html involved | 109 | page.should_not have_xpath('/html') # Page should render the image which means there is no html involved |
110 | + Gollum::Wiki.any_instance.unstub(:file) | ||
111 | + Gollum::File.any_instance.unstub(:mime_type) | ||
110 | end | 112 | end |
111 | 113 | ||
112 | Then 'Image should be shown on the page' do | 114 | Then 'Image should be shown on the page' do |