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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-29 17:40:13 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-29 17:40:13 +0400
commit88b1e0ffcd27ab3d9ff9ce1fe5b493e3f6296b21 (patch)
tree1d79d32b2d5a73367a8fb6e101a8bcefff18e2a6 /spec/models/repository_spec.rb
parent2ebd2d41a52dd6401d86cb57a5f64372da968c41 (diff)
Faster branch contains detection for commit
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
new file mode 100644
index 00000000000..6a95b5b33c0
--- /dev/null
+++ b/spec/models/repository_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe Repository do
+ include RepoHelpers
+
+ let(:repository) { create(:project).repository }
+
+ describe :branch_names_contains do
+ subject { repository.branch_names_contains(sample_commit.id) }
+
+ it { should include('master') }
+ it { should_not include('feature') }
+ it { should_not include('fix') }
+ end
+end