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:
authorLuke Duncalfe <lduncalfe@gitlab.com>2019-02-06 15:33:11 +0300
committerNick Thomas <nick@gitlab.com>2019-02-06 15:33:11 +0300
commit2b7dd017af7de4d09ef3a1cd835e8d07c8800b6a (patch)
tree47615a573f6dc932353f0f6695cd4fcd050b1201 /spec/models/commit_collection_spec.rb
parent5bfa8e2f5e03849645570ba8c2dbfcc5c834f1b1 (diff)
Allow custom squash commit messages
Diffstat (limited to 'spec/models/commit_collection_spec.rb')
-rw-r--r--spec/models/commit_collection_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/commit_collection_spec.rb b/spec/models/commit_collection_spec.rb
index 005005b236b..12e59b35428 100644
--- a/spec/models/commit_collection_spec.rb
+++ b/spec/models/commit_collection_spec.rb
@@ -35,6 +35,17 @@ describe CommitCollection do
end
end
+ describe '#without_merge_commits' do
+ it 'returns all commits except merge commits' do
+ collection = described_class.new(project, [
+ build(:commit),
+ build(:commit, :merge_commit)
+ ])
+
+ expect(collection.without_merge_commits.size).to eq(1)
+ end
+ end
+
describe '#with_pipeline_status' do
it 'sets the pipeline status for every commit so no additional queries are necessary' do
create(