diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 00:09:08 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 00:09:08 +0000 |
commit | f54a50aa826d0eedcf2e56f51462613bc132f826 (patch) | |
tree | 7194aca23f9af822ea55966a6f477b3d8d68ee47 /spec/models/snippet_spec.rb | |
parent | c77fda905a8619b756163c10a75171dc9cfe7084 (diff) | |
download | gitlab-ce-f54a50aa826d0eedcf2e56f51462613bc132f826.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/snippet_spec.rb')
-rw-r--r-- | spec/models/snippet_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
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) |