Cover AccountsController more in spec (#3229)
* Introduce recent scope to Status and StreamEntry Introduce recent scope to Status and StreamEntry as Account has. * Cover AccountsController more in AccountsController
This commit is contained in:
parent
9afd7dadbf
commit
8fd174298d
4 changed files with 38 additions and 9 deletions
|
@ -25,6 +25,7 @@ class StreamEntry < ApplicationRecord
|
|||
STATUS_INCLUDES = [:account, :stream_entry, :conversation, :media_attachments, :tags, mentions: :account, reblog: [:stream_entry, :account, :conversation, :media_attachments, :tags, mentions: :account], thread: [:stream_entry, :account]].freeze
|
||||
|
||||
default_scope { where(activity_type: 'Status') }
|
||||
scope :recent, -> { reorder(id: :desc) }
|
||||
scope :with_includes, -> { includes(:account, status: STATUS_INCLUDES) }
|
||||
|
||||
delegate :target, :title, :content, :thread,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue