Skip to content

Commit

Permalink
Fix tests that depended on old github location
Browse files Browse the repository at this point in the history
* Two tests depended on the following file existing:
  github/gollum/master/test/file_view/1_file.txt
  • Loading branch information
simonista committed Mar 15, 2013
1 parent 544d499 commit 02dfb0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/gollum/markup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def extract_gitcode data
# Use empty string if $2 is nil.
uri = $2 || ''
# Detect local file.
if uri[0..6] != 'github/'
if uri[0..6] != 'gollum/'
if file = self.find_file(uri, @wiki.ref)
contents = file.raw_data
else
Expand Down
4 changes: 2 additions & 2 deletions test/test_gitcode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def page_with_content c
@wiki, @path, @cleanup = WikiFactory.create 'examples/test.git'

# given
p = page_with_content "a\n\n```html:github/gollum/master/test/file_view/1_file.txt```\n\nb"
p = page_with_content "a\n\n```html:gollum/gollum/master/test/file_view/1_file.txt```\n\nb"

# when rendering the page
@rendered = Gollum::Markup.new(p).render
Expand All @@ -29,7 +29,7 @@ def page_with_content c
end

test 'contents' do
g = Gollum::Gitcode.new 'github/gollum/master/test/file_view/1_file.txt'
g = Gollum::Gitcode.new 'gollum/gollum/master/test/file_view/1_file.txt'

assert_equal g.contents, %{<ol class=\"tree\">\n <li class=\"file\">\n <a href=\"0\"><span class=\"icon\"></span>0</a>\n </li>\n</ol>\n}
end
Expand Down

0 comments on commit 02dfb0a

Please sign in to comment.