Commit 02ae038c57825cbc1bff45a431c80faabbe4bf29
Exists in
spb-stable
and in
2 other branches
Merge branch 'fix_test' into 'master'
Fixes failing test
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 | 46 | And I click on the "Pages" button |
| 47 | 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 | 55 | Scenario: Image in wiki repo shown on the page |
| 50 | 56 | Given I have an existing Wiki page with images linked on page |
| 51 | 57 | And I browse to wiki page with images |
| ... | ... | @@ -56,9 +62,3 @@ Feature: Project Wiki |
| 56 | 62 | And I browse to wiki page with images |
| 57 | 63 | And I click on image link |
| 58 | 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 | 107 | url = URI.parse(current_url) |
| 108 | 108 | url.path.should match("wikis/image.jpg") |
| 109 | 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 | 112 | end |
| 111 | 113 | |
| 112 | 114 | Then 'Image should be shown on the page' do | ... | ... |