diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 14:02:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 14:02:45 +0000 |
commit | 80f61b4035607d7cd87de993b8f5e996bde3481f (patch) | |
tree | 06b12f51e97d87192e3dd0e05edf55143645b894 /spec/models/note_spec.rb | |
parent | 4ab54c2233e91f60a80e5b6fa2181e6899fdcc3e (diff) | |
download | gitlab-ce-80f61b4035607d7cd87de993b8f5e996bde3481f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r-- | spec/models/note_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 927fbdb93d8..66e3c6d5e9d 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -73,6 +73,10 @@ describe Note do end describe "Commit notes" do + before do + allow(Gitlab::Git::KeepAround).to receive(:execute).and_call_original + end + let!(:note) { create(:note_on_commit, note: "+1 from me") } let!(:commit) { note.noteable } @@ -92,7 +96,9 @@ describe Note do end it "keeps the commit around" do - expect(note.project.repository.kept_around?(commit.id)).to be_truthy + repo = note.project.repository + + expect(repo.ref_exists?("refs/keep-around/#{commit.id}")).to be_truthy end it 'does not generate N+1 queries for participants', :request_store do |