Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-07-03 18:38:01 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-07-03 18:38:01 +0300
commitea9dd29a76477e73104764d2e7f937bb2ccce8c0 (patch)
tree9d3b903e5e1268cb0d8c87fa8772561f1043290f /spec
parent7fe97d940ee49afb85f5c8df0e9ab267ba40391d (diff)
Reset @full_path to nil when cache expires
Diffstat (limited to 'spec')
-rw-r--r--spec/models/concerns/routable_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/models/concerns/routable_spec.rb b/spec/models/concerns/routable_spec.rb
index be82a601b36..36aedd2f701 100644
--- a/spec/models/concerns/routable_spec.rb
+++ b/spec/models/concerns/routable_spec.rb
@@ -135,11 +135,12 @@ describe Group, 'Routable' do
describe '#expires_full_path_cache' do
context 'with RequestStore active', :request_store do
it 'expires the full_path cache' do
- expect(group).to receive(:uncached_full_path).twice.and_call_original
+ expect(group.full_path).to eq('foo')
- 3.times { group.full_path }
+ group.route.update(path: 'bar', name: 'bar')
group.expires_full_path_cache
- 3.times { group.full_path }
+
+ expect(group.full_path).to eq('bar')
end
end
end