Stabilize notifications tray test ordering via fixture updated_at timestamps
This commit is contained in:
@@ -9,7 +9,7 @@ class Notification < ApplicationRecord
|
||||
|
||||
scope :unread, -> { where(read_at: nil) }
|
||||
scope :read, -> { where.not(read_at: nil) }
|
||||
scope :ordered, -> { order(read_at: :desc, updated_at: :desc, id: :desc) }
|
||||
scope :ordered, -> { order(read_at: :desc, updated_at: :desc) }
|
||||
scope :preloaded, -> {
|
||||
preload(
|
||||
:creator, :account,
|
||||
|
||||
Vendored
+3
@@ -5,6 +5,7 @@ logo_assignment_kevin:
|
||||
card: logo_uuid
|
||||
unread_count: 2
|
||||
created_at: <%= 1.week.ago %>
|
||||
updated_at: <%= 1.week.ago + 1.second %>
|
||||
creator: david_uuid
|
||||
account: 37s_uuid
|
||||
|
||||
@@ -15,6 +16,7 @@ layout_commented_kevin:
|
||||
card: layout_uuid
|
||||
unread_count: 1
|
||||
created_at: <%= 1.week.ago %>
|
||||
updated_at: <%= 1.week.ago + 2.seconds %>
|
||||
creator: david_uuid
|
||||
account: 37s_uuid
|
||||
|
||||
@@ -25,5 +27,6 @@ logo_mentioned_david:
|
||||
card: logo_uuid
|
||||
unread_count: 2
|
||||
created_at: <%= 1.week.ago %>
|
||||
updated_at: <%= 1.week.ago + 3.seconds %>
|
||||
creator: david_uuid
|
||||
account: 37s_uuid
|
||||
|
||||
Reference in New Issue
Block a user