-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #1016] display notifications for avis
- Loading branch information
Showing
5 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
spec/views/new_gestionnaire/avis/avis_list.html.haml_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |