summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-08-24 17:19:15 -0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-08-24 17:19:15 -0300
commit2cbad40f3ecc1d37f6b21541a7960d24eee652ea (patch)
tree334a0f60b2494b370d36af8b6f8bd79441954785
parent4b75525e271a1cc88bfcb0c5436e852e1ee19f57 (diff)
downloadgitlab-ce-gitaly-9-5-2-patch.tar.gz
Add spec for Gitlab::Git::Commit#rugged_commitgitaly-9-5-2-patch
-rw-r--r--spec/lib/gitlab/git/commit_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb
index 4c3cc04e7a0..c37508402c4 100644
--- a/spec/lib/gitlab/git/commit_spec.rb
+++ b/spec/lib/gitlab/git/commit_spec.rb
@@ -461,6 +461,17 @@ describe Gitlab::Git::Commit, seed_helper: true do
it { is_expected.not_to include("feature") }
end
+ describe '#rugged_commit' do
+ let(:raw_commit) { { id: SeedRepo::Commit::ID } }
+ let(:commit) { described_class.decorate(repository, raw_commit) }
+ subject { commit.send(:rugged_commit) }
+
+ it 'returns a rugged commit based on the id of a non-rugged raw commit' do
+ expect(subject.class).to be(Rugged::Commit)
+ expect(subject).to eq(rugged_commit)
+ end
+ end
+
def sample_commit_hash
{
author_email: "dmitriy.zaporozhets@gmail.com",