[Fix #1016] display notifications for avis
This commit is contained in:
parent
8e67e5c057
commit
c3e7e39947
5 changed files with 33 additions and 6 deletions
20
spec/views/new_gestionnaire/avis/avis_list.html.haml_spec.rb
Normal file
20
spec/views/new_gestionnaire/avis/avis_list.html.haml_spec.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
describe 'new_gestionnaire/avis/avis_list.html.haml', type: :view do
|
||||
before { view.extend DossierHelper }
|
||||
|
||||
subject { render 'new_gestionnaire/avis/avis_list.html.haml', avis: avis, avis_seen_at: seen_at, current_gestionnaire: gestionnaire }
|
||||
|
||||
let(:gestionnaire) { create(:gestionnaire) }
|
||||
let(:avis) { [create(:avis, claimant: gestionnaire)] }
|
||||
|
||||
context "with a seen_at after avis created_at" do
|
||||
let(:seen_at) { avis.first.created_at + 1.hour }
|
||||
|
||||
it { is_expected.not_to have_css(".highlighted") }
|
||||
end
|
||||
|
||||
context "with a seen_at after avis created_at" do
|
||||
let(:seen_at) { avis.first.created_at - 1.hour }
|
||||
|
||||
it { is_expected.to have_css(".highlighted") }
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue