summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/gitlab_access_spec.rb1
-rw-r--r--spec/gitlab_post_receive_spec.rb8
-rw-r--r--spec/names_helper_spec.rb5
3 files changed, 4 insertions, 10 deletions
diff --git a/spec/gitlab_access_spec.rb b/spec/gitlab_access_spec.rb
index 2781aa9..a602883 100644
--- a/spec/gitlab_access_spec.rb
+++ b/spec/gitlab_access_spec.rb
@@ -22,7 +22,6 @@ describe GitlabAccess do
end
describe :initialize do
- it { subject.repo_name.should == repo_name }
it { subject.repo_path.should == repo_path }
it { subject.changes.should == ['wow'] }
it { subject.protocol.should == 'ssh' }
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",
diff --git a/spec/names_helper_spec.rb b/spec/names_helper_spec.rb
index a5fcf94..f2a95e5 100644
--- a/spec/names_helper_spec.rb
+++ b/spec/names_helper_spec.rb
@@ -4,11 +4,6 @@ require 'names_helper'
describe NamesHelper do
include NamesHelper
- describe :extract_repo_name do
- it { extract_repo_name(' /opt/repos/randx/gitlab.git').should == 'randx/gitlab' }
- it { extract_repo_name("/opt/repos/randx/gitlab.git\r\n").should == 'randx/gitlab' }
- end
-
describe :extract_ref_name do
it { extract_ref_name('refs/heads/awesome-feature').should == 'awesome-feature' }
it { extract_ref_name('refs/tags/v2.2.1').should == 'v2.2.1' }