diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-04-04 19:35:39 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-04-04 19:35:39 -0300 |
commit | f2005fa56682a5dc3b57d610cb733a34b2e08520 (patch) | |
tree | 151024fc9a4ed60da9f28cc616b4f6fbc6ba1baa /spec/models/repository_spec.rb | |
parent | a55fc41657567fc0343fe5cd6fee8c5e20c851ce (diff) | |
download | gitlab-ce-f2005fa56682a5dc3b57d610cb733a34b2e08520.tar.gz |
Flush repository cache before import project datafix-gh-pr-import
GitHub Pull Requests importer handle with the repository while
importing data, we need to make sure that the cached values are valid.
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r-- | spec/models/repository_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index c5d5a1c2492..f517f325c03 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -612,6 +612,20 @@ describe Repository, models: true do end end + describe '#before_import' do + it 'flushes the emptiness cachess' do + expect(repository).to receive(:expire_emptiness_caches) + + repository.before_import + end + + it 'flushes the exists cache' do + expect(repository).to receive(:expire_exists_cache) + + repository.before_import + end + end + describe '#after_import' do it 'flushes the emptiness cachess' do expect(repository).to receive(:expire_emptiness_caches) |