Remove snippet sync after git action

parent b9ec8706
......@@ -77,11 +77,6 @@ class PostReceive # rubocop:disable Scalability/IdempotentWorker
return false unless user
# We can remove once we implement multi-file snippets
# https://gitlab.com/gitlab-org/gitlab/-/issues/39269
blob = snippet.blobs.first
snippet.update(file_name: blob.path, content: blob.data) if blob
# At the moment, we only expires the repository caches.
# In the future we might need to call ProjectCacheWorker
# (or the custom class we create) to update the snippet
......
......@@ -421,24 +421,6 @@ describe PostReceive do
perform
end
end
it 'updates the snippet db information' do
blob = snippet.blobs.first
expect(snippet).to receive(:update).with(file_name: blob.path, content: blob.data)
perform
end
context 'when snippet does not have any blob' do
it 'does not update snippet db information' do
allow(snippet).to receive(:blobs).and_return([])
expect(snippet).not_to receive(:update)
perform
end
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment