Commit Graph

12 Commits (0e2589867f2a54fe9a71c20560d90d7f77c12bd3)

Author SHA1 Message Date
Matt Jankowski effb08edbb More status specs (#2564)
* Add rough outline of coverage needed for public timeline

* Specs for visibility, replies, boosts

* Specs for silenced account

* Specs for local_only option

* Specs for blocks and mutes

* Add tentative spec around including other silenced account statuses

* Add with_public_visibility scope

* Add simple coverage for tag_timeline

* Tag timeline includes replies

* Replace tag.statuses with a tagged_with scope in tag timeline method

* Use with_public_visibility in tag timeline

* Extract common scope between public and tag timelines to method

* Extract local domain check to local_only scope

* Extract local_only check to starting scope method

* Move list of excluded from timeline account ids to account model

* Simplify excluded accounts list on account model

* Only join accounts when needed

* Rename method for account specific filtering

* Extract method for account exclusions

* Fix bug where silenced accounts were not including statuses from other silenced accounts

* DRY up filter application from account or no account

* timeline_scope can be private

* Add spec showing that account can find its excluded accounts ids

* Add spec which fails if local_only does not have a left outer join

* rubocop
8 years ago
Matt Jankowski affd75936e Add spec for Status.as_home_timeline (#2451) 8 years ago
Eugen 338df98ddf Add more FeedManager#filter? tests (#2413) 8 years ago
Eugen 32748c0f71 Merge pull request #1184 from thoughtbot/extract-proper-status
DRY up reblog vs original status check
8 years ago
Joël Quenneville 4fdeac21f4 Implement pending specs on Status
Implement the two pending specs on `Status`: `reblogs_count` and
`favourites_count`.
8 years ago
Joël Quenneville d4c94fa004 DRY up reblog vs original status check
Checking reblog vs original status was happening in multiple places
across the app. For views, this logic was encapsulated in a helper
method named `proper_status` but in the other layers of the app, the
logic was duplicated.

Because the logic is used at all layers of the app, we extracted it into
a `Status#proper` method on the model and changed all uses of the logic
to use this method. There is now a single source of truth for this
condition.

We added test coverage to untested methods that got refactored.
8 years ago
Eugen Rochko a08e724476 Fix subscriptions:clear task, refactor feeds, refactor streamable activites
and atom feed generation to some extent, as well as the way mentions are
stored
9 years ago
Eugen Rochko c8999a116e Sanitize remote html in atom feeds, API (not just UI), use cached mention
relations on Status#mentions
9 years ago
Eugen Rochko d4892ace62 Adding more test stubs 9 years ago
Eugen Rochko f16b31f077 Adding a bunch of tests 9 years ago
Eugen Rochko 71fe24096c Adding a Mention model, test stubs 9 years ago
Eugen Rochko 9c4856bdb1 Initial commit 9 years ago