Merge pull request #651 from simonista/fix-specs
Fix tests that depended on old github location
This commit is contained in:
@@ -470,7 +470,7 @@ module Gollum
|
||||
# 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
|
||||
|
||||
@@ -18,7 +18,7 @@ context "gitcode" do
|
||||
@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
|
||||
@@ -29,7 +29,7 @@ context "gitcode" do
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user