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:
authorStan Hu <stanhu@gmail.com>2019-06-26 02:58:42 +0300
committerStan Hu <stanhu@gmail.com>2019-06-26 02:58:42 +0300
commit3221f1a758b661133a546967167ec81b6917abfb (patch)
tree817b77abe023e8fcf218a0f0f4228ab728e756ca /spec
parent5e7833d8c0355bbebf438777022271ec732368ee (diff)
parentda2f451f95b97ee2be77de52695be61553ebce52 (diff)
Merge branch 'da-fix-cache-for-broadcast-message' into 'master'
Set 2 weeks as the expiration time for the current broadcast message See merge request gitlab-org/gitlab-ce!30062
Diffstat (limited to 'spec')
-rw-r--r--spec/models/broadcast_message_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/broadcast_message_spec.rb b/spec/models/broadcast_message_spec.rb
index 4d53e4aad8a..020ada3c47a 100644
--- a/spec/models/broadcast_message_spec.rb
+++ b/spec/models/broadcast_message_spec.rb
@@ -48,14 +48,14 @@ describe BroadcastMessage do
expect(described_class.current).to be_empty
end
- it 'caches the output of the query' do
+ it 'caches the output of the query for two weeks' do
create(:broadcast_message)
- expect(described_class).to receive(:current_and_future_messages).and_call_original.once
+ expect(described_class).to receive(:current_and_future_messages).and_call_original.twice
described_class.current
- Timecop.travel(1.year) do
+ Timecop.travel(3.weeks) do
described_class.current
end
end