From f54a50aa826d0eedcf2e56f51462613bc132f826 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 28 Feb 2020 00:09:08 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/models/snippet_spec.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'spec/models/snippet_spec.rb') diff --git a/spec/models/snippet_spec.rb b/spec/models/snippet_spec.rb index 93bc42c144d..1265b95736d 100644 --- a/spec/models/snippet_spec.rb +++ b/spec/models/snippet_spec.rb @@ -536,7 +536,7 @@ describe Snippet do end describe '#track_snippet_repository' do - let(:snippet) { create(:snippet, :repository) } + let(:snippet) { create(:snippet) } context 'when a snippet repository entry does not exist' do it 'creates a new entry' do @@ -554,7 +554,8 @@ describe Snippet do end context 'when a tracking entry exists' do - let!(:snippet_repository) { create(:snippet_repository, snippet: snippet) } + let!(:snippet) { create(:snippet, :repository) } + let(:snippet_repository) { snippet.snippet_repository } let!(:shard) { create(:shard, name: 'foo') } it 'does not create a new entry in the database' do @@ -592,7 +593,7 @@ describe Snippet do end context 'when repository exists' do - let(:snippet) { create(:snippet, :repository) } + let!(:snippet) { create(:snippet, :repository) } it 'does not try to create repository' do expect(snippet.repository).not_to receive(:after_create) -- cgit v1.2.1