Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2016-07-27 00:22:13 +0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2016-07-27 00:22:13 +0300
commit1dcfb1d3a7b6b8002b1f25e8cf463617acbc1299 (patch)
tree617ebc3e0e06e2001a6f34cadc448366ceebda9f /spec/workers/repository_fork_worker_spec.rb
parent0c799be6b6fc0166473c82039ebf662a0558ed8f (diff)
Fix a bug where forking a project from a repository storage to another would fail
Diffstat (limited to 'spec/workers/repository_fork_worker_spec.rb')
-rw-r--r--spec/workers/repository_fork_worker_spec.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/workers/repository_fork_worker_spec.rb b/spec/workers/repository_fork_worker_spec.rb
index 5f762282b5e..60605460adb 100644
--- a/spec/workers/repository_fork_worker_spec.rb
+++ b/spec/workers/repository_fork_worker_spec.rb
@@ -14,21 +14,24 @@ describe RepositoryForkWorker do
describe "#perform" do
it "creates a new repository from a fork" do
expect(shell).to receive(:fork_repository).with(
- project.repository_storage_path,
+ '/test/path',
project.path_with_namespace,
+ project.repository_storage_path,
fork_project.namespace.path
).and_return(true)
subject.perform(
project.id,
+ '/test/path',
project.path_with_namespace,
fork_project.namespace.path)
end
it 'flushes various caches' do
expect(shell).to receive(:fork_repository).with(
- project.repository_storage_path,
+ '/test/path',
project.path_with_namespace,
+ project.repository_storage_path,
fork_project.namespace.path
).and_return(true)
@@ -38,7 +41,7 @@ describe RepositoryForkWorker do
expect_any_instance_of(Repository).to receive(:expire_exists_cache).
and_call_original
- subject.perform(project.id, project.path_with_namespace,
+ subject.perform(project.id, '/test/path', project.path_with_namespace,
fork_project.namespace.path)
end
@@ -49,6 +52,7 @@ describe RepositoryForkWorker do
subject.perform(
project.id,
+ '/test/path',
project.path_with_namespace,
fork_project.namespace.path)
end