fix wiki path issues and spec

This commit is contained in:
James Lopez 2016-03-09 10:35:38 +01:00
parent f9c6168cc4
commit 4b88b4ffd5
3 changed files with 8 additions and 1 deletions

View File

@ -27,7 +27,7 @@ module Projects
end
def project_filename
"#{@project.namespace}#{@project.name}.bundle"
"#{@project.name}.bundle"
end
def path_to_repo

View File

@ -18,6 +18,10 @@ module Projects
private
def project_filename
"#{@project.name}.wiki.bundle"
end
def path_to_repo
@wiki.repository.path_to_repo
end

View File

@ -8,10 +8,13 @@ describe Projects::ImportExport::WikiRepoBundler, services: true do
let(:export_path) { "#{Dir::tmpdir}/project_tree_saver_spec" }
let(:shared) { Projects::ImportExport::Shared.new(relative_path: project.path_with_namespace) }
let(:wiki_bundler) { Projects::ImportExport::WikiRepoBundler.new(project: project, shared: shared) }
let!(:project_wiki) { ProjectWiki.new(project, user) }
before(:each) do
project.team << [user, :master]
allow_any_instance_of(Projects::ImportExport).to receive(:storage_path).and_return(export_path)
project_wiki.wiki
project_wiki.create_page("index", "test content")
end
after(:each) do