diff options
Diffstat (limited to 'spec/models/commit_collection_spec.rb')
-rw-r--r-- | spec/models/commit_collection_spec.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/models/commit_collection_spec.rb b/spec/models/commit_collection_spec.rb index 6dd34c3e21f..706f18a5337 100644 --- a/spec/models/commit_collection_spec.rb +++ b/spec/models/commit_collection_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe CommitCollection do +RSpec.describe CommitCollection, feature_category: :source_code_management do let(:project) { create(:project, :repository) } let(:commit) { project.commit("c1c67abbaf91f624347bb3ae96eabe3a1b742478") } @@ -191,6 +191,19 @@ RSpec.describe CommitCollection do end end + describe '#load_tags' do + let(:gitaly_commit_with_tags) { project.commit('5937ac0a7beb003549fc5fd26fc247adbce4a52e') } + let(:collection) { described_class.new(project, [gitaly_commit_with_tags]) } + + subject { collection.load_tags } + + it 'loads tags' do + subject + + expect(collection.commits[0].referenced_by).to contain_exactly('refs/tags/v1.1.0') + end + end + describe '#respond_to_missing?' do it 'returns true when the underlying Array responds to the message' do collection = described_class.new(project, []) |