Commit Graph

15 Commits (ac62b995efdf6fc71f3a1adf60da99ed7ddde26b)

Author SHA1 Message Date
Daniel M Brasil 4230d1ee0a
Migrate to request specs in `/api/v1/timelines/tag/:hashtag` (#25797) 1 year ago
Daniel M Brasil ccca542db1
Fix `/api/v1/timelines/tag/:hashtag` allowing for unauthenticated access when public preview is disabled (#26237) 1 year ago
Daniel M Brasil 5a7c6c6597
Migrate to request specs in `/api/v1/timelines/public` (#25746)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Daniel M Brasil 8a1aabaac1
Migrate to request specs in `/api/v1/timelines/home` (#25743) 2 years ago
Nick Schonning aef0051fd0
Enable Rubocop HTTP status rules (#23717) 2 years ago
Claire e38fc319dc
Refactor and improve tests (#17386)
* Change account and user fabricators to simplify and improve tests

- `Fabricate(:account)` implicitly fabricates an associated `user` if
  no `domain` attribute is given (an account with `domain: nil` is
  considered a local account, but no user record was created), unless
  `user: nil` is passed
- `Fabricate(:account, user: Fabricate(:user))` should still be possible
  but is discouraged.

* Fix and refactor tests

- avoid passing unneeded attributes to `Fabricate(:user)` or
  `Fabricate(:account)`
- avoid embedding `Fabricate(:user)` into a `Fabricate(:account)` or the other
  way around
- prefer `Fabricate(:user, account_attributes: …)` to
  `Fabricate(:user, account: Fabricate(:account, …)`
- also, some tests were using remote accounts with local user records, which is
  not representative of production code.
3 years ago
Eugen Rochko 3fd6ab99e6
Remove deprecated REST API `GET /api/v1/timelines/direct` (#11212) 6 years ago
Eugen Rochko a49d43d112
Add scheduled statuses (#9706)
Fix #340
6 years ago
ysksn 0c80715235 Add spec for Api::V1::Timelines::DirectController (#9547) 6 years ago
aus-social 1f98eae1cf Lint pass (#8876) 6 years ago
Eugen Rochko 1f6ed4f86a
Add more granular OAuth scopes (#7929)
* Add more granular OAuth scopes

* Add human-readable descriptions of the new scopes

* Ensure new scopes look good on the app UI

* Add tests

* Group scopes in screen and color-code dangerous ones

* Fix wrong extra scope
7 years ago
Yamagishi Kazutoshi d10447c3a8 Use raw status code on have_http_status (#7214) 7 years ago
Eugen Rochko 24cafd73a2
Lists (#5703)
* Add structure for lists

* Add list timeline streaming API

* Add list APIs, bind list-account relation to follow relation

* Add API for adding/removing accounts from lists

* Add pagination to lists API

* Add pagination to list accounts API

* Adjust scopes for new APIs

- Creating and modifying lists merely requires "write" scope
- Fetching information about lists merely requires "read" scope

* Add test for wrong user context on list timeline

* Clean up tests
7 years ago
Akihiko Odaki 4f0b638cda Introduce access token fabricators (#4401) 8 years ago
Matt Jankowski 4289ed1d13 Refactor of API timeline actions (#3263)
- Increase coverage to exercise all parts of each action
- Move into namespace to share common code
- Misc refactor of each action for smaller methods, simpler code
8 years ago