add feature-flip for instructeurs on cached notifications
This commit is contained in:
parent
52ea5ef89a
commit
c7b96d3d43
6 changed files with 49 additions and 5 deletions
|
@ -103,9 +103,10 @@ describe Dossier do
|
|||
|
||||
before do
|
||||
create(:follow, dossier: dossier, instructeur: instructeur, messagerie_seen_at: 2.hours.ago)
|
||||
Flipper.enable_actor(:cached_notifications, instructeur)
|
||||
end
|
||||
|
||||
subject { instructeur.followed_dossiers.with_notifications }
|
||||
subject { instructeur.followed_dossiers.with_notifications(instructeur) }
|
||||
|
||||
context('without changes') do
|
||||
it { is_expected.to eq [] }
|
||||
|
|
|
@ -8,6 +8,7 @@ describe Instructeur, type: :model do
|
|||
|
||||
before do
|
||||
assign(procedure_2)
|
||||
Flipper.enable_actor(:cached_notifications, instructeur)
|
||||
end
|
||||
|
||||
describe 'follow' do
|
||||
|
|
|
@ -262,6 +262,7 @@ describe ProcedurePresentation do
|
|||
let!(:older_dossier) { create(:dossier, :en_construction, procedure: procedure) }
|
||||
|
||||
before do
|
||||
Flipper.enable_actor(:cached_notifications, instructeur)
|
||||
notified_dossier.update!(last_champ_updated_at: Time.zone.local(2018, 9, 20))
|
||||
create(:follow, instructeur: instructeur, dossier: notified_dossier, demande_seen_at: Time.zone.local(2018, 9, 10))
|
||||
notified_dossier.touch(time: Time.zone.local(2018, 9, 20))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue