summaryrefslogtreecommitdiff
path: root/spec/gitlab_post_receive_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-10-27 12:34:23 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-10-27 16:57:57 +0300
commit00bf30ba9f5831e74b6990d4179bd6e4c0ce072a (patch)
treee55c08dafc6d0a6100aa1a3bbb49433e77699339 /spec/gitlab_post_receive_spec.rb
parenteae98b679b775454c630440b93f41dfdc8b1f72d (diff)
downloadgitlab-shell-00bf30ba9f5831e74b6990d4179bd6e4c0ce072a.tar.gz
Use full repository path for API calls instead of extracting namedz-support-nested-namespaces
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/gitlab_post_receive_spec.rb')
-rw-r--r--spec/gitlab_post_receive_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/gitlab_post_receive_spec.rb b/spec/gitlab_post_receive_spec.rb
index db1e776..bac6f97 100644
--- a/spec/gitlab_post_receive_spec.rb
+++ b/spec/gitlab_post_receive_spec.rb
@@ -18,7 +18,7 @@ describe GitlabPostReceive do
before do
GitlabConfig.any_instance.stub(repos_path: repository_path)
GitlabNet.any_instance.stub(broadcast_message: { })
- GitlabNet.any_instance.stub(:merge_request_urls).with(repo_name, wrongly_encoded_changes) { [] }
+ GitlabNet.any_instance.stub(:merge_request_urls).with(repo_path, wrongly_encoded_changes) { [] }
expect(Time).to receive(:now).and_return(enqueued_at)
end
@@ -35,7 +35,7 @@ describe GitlabPostReceive do
context 'Without broad cast message' do
context 'pushing new branch' do
before do
- GitlabNet.any_instance.stub(:merge_request_urls).with(repo_name, wrongly_encoded_changes) do
+ GitlabNet.any_instance.stub(:merge_request_urls).with(repo_path, wrongly_encoded_changes) do
[{
"branch_name" => "new_branch",
"url" => "http://localhost/dzaporozhets/gitlab-ci/merge_requests/new?merge_request%5Bsource_branch%5D=new_branch",
@@ -62,7 +62,7 @@ describe GitlabPostReceive do
context 'pushing existing branch with merge request created' do
before do
- GitlabNet.any_instance.stub(:merge_request_urls).with(repo_name, wrongly_encoded_changes) do
+ GitlabNet.any_instance.stub(:merge_request_urls).with(repo_path, wrongly_encoded_changes) do
[{
"branch_name" => "feature_branch",
"url" => "http://localhost/dzaporozhets/gitlab-ci/merge_requests/1",
@@ -90,7 +90,7 @@ describe GitlabPostReceive do
context 'show broadcast message and merge request link' do
before do
- GitlabNet.any_instance.stub(:merge_request_urls).with(repo_name, wrongly_encoded_changes) do
+ GitlabNet.any_instance.stub(:merge_request_urls).with(repo_path, wrongly_encoded_changes) do
[{
"branch_name" => "new_branch",
"url" => "http://localhost/dzaporozhets/gitlab-ci/merge_requests/new?merge_request%5Bsource_branch%5D=new_branch",