Commit Graph

266 Commits (513f187dafd8ff441479a6de12c61f8bb8d4c5bf)

Author SHA1 Message Date
Matt Jankowski 7e514688b3
Convert `api/v2/search` controller spec to request spec (#28269) 1 year ago
Matt Jankowski 71e5a16eba
Remove triple subject call in `api/v1/lists` spec (#28210) 1 year ago
Matt Jankowski cca19f5fbb
Use the `Admin::ActionLog` fabricator in admin/action_logs spec (#28194) 1 year ago
Matt Jankowski 0530ce5e95
Convert accounts controller spec to request spec (#28126) 1 year ago
Claire 85662a5a57
Change `img-src` and `media-src` CSP directives to not include `https:` (#28025) 1 year ago
Kevin Bongart 7877fcd83c
Deduplicate IDs in relationships and familiar_followers APIs (#27982) 1 year ago
Matt Jankowski 973597c6f1
Consolidate configuration of `Sidekiq::Testing.fake!` setup (#28046) 1 year ago
Matt Jankowski 9742bccbe7
Add coverage for `api/v2/media` endpoint (#28027) 1 year ago
Matt Jankowski 30ee4aaff4
Convert measurement `api/v1/admin/*` controller specs to request specs (#28005) 1 year ago
Matt Jankowski 32e19e3af6
Reduce `.times` usage in request and controller specs (#27949) 1 year ago
Matt Jankowski a6d446e6a7
Add coverage for `remote_interaction_helper` (#28002) 1 year ago
Matt Jankowski 876f5b1d12
Convert `/instances/*` controller specs to request specs (#27988)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Matt Jankowski 718c95e7af
Convert `api/v1/custom_emojis` controller spec to request spec (#27985)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Matt Jankowski 17582d36d5
Convert `api/v1/preferences` controller spec to request spec (#27987) 1 year ago
Matt Jankowski 9a01a260a0
Convert `api/v1/scheduled_statuses` controller spec to request spec (#27986) 1 year ago
Matt Jankowski b9fb47aeb1
Convert `api/v1/endorsements` controller spec to request spec (#27984) 1 year ago
Matt Jankowski 09a2db3f6c
Move api/v2/filters spec to correct path location (#27950) 1 year ago
Claire 297839c10c
Rewrite `/api/v1/statuses` tests as request specs (#27891) 1 year ago
Claire 9257737675
Rewrite `/api/v1/accounts` tests as request specs (#27888) 1 year ago
Matt Jankowski 549e8e7baf
Add `email_spec` and speedup/cleanup to `spec/mailers` (#27902) 1 year ago
Matt Jankowski 3f0c1566c3
Reduce expectations for `RSpec/MultipleExpectations` cop in `api/v1/accounts/relationships` spec (#27879) 1 year ago
Matt Jankowski 3de9145613
Move controller specs for `well-known` endpoints to request specs (#27855) 1 year ago
Matt Jankowski 12a5b7391d
Add spec for well known change password endpoint (#27856) 1 year ago
Matt Jankowski d562fb8459
Specs for minimal CSP policy in `Api::` controllers (#27845) 1 year ago
Matt Jankowski 5e2ecc736d
Remove double `subject` in api/v1/accounts/relationships spec (#27839) 1 year ago
Claire 07a4059901
Add support for invite codes in the registration API (#27805) 1 year ago
Claire c451bbe249
Allow viewing and severing relationships with suspended accounts (#27667) 1 year ago
Matt Jankowski 9b7b4d748f
Simplify request cache spec shared examples (#27673) 1 year ago
Claire 23e32a4b30
Fix format-dependent redirects being cached regardless of requested format (#27632) 1 year ago
Matt Jankowski a688a9ed20
Use strings instead of numeric literals and remove `rubocop:disable` in cache spec (#27742) 1 year ago
Matt Jankowski 949f5eb860
Fix `RSpec/MetadataStyle` cop in spec/ (#27729) 1 year ago
Claire bbf46cc418
Fix error and incorrect URLs in `/api/v1/accounts/:id/featured_tags` for remote accounts (#27459) 1 year ago
Daniel M Brasil 26d2a2a0cc
Migrate to request specs in `/api/v1/media` (#25543) 1 year ago
Emelia Smith 7c3fea7275
Feature: Allow token introspection without read scope (#27142) 1 year ago
Daniel M Brasil e0ed0f8c7c
Migrate to request specs in `/api/v1/notifications` (#25553) 1 year ago
Daniel M Brasil cafdaec6cf
Migrate to request specs in `/api/v1/lists/:id/accounts` (#25468) 1 year ago
Daniel M Brasil 8e6116503d
Migrate to request specs in `/api/v1/blocks` (#25517) 1 year ago
Daniel M Brasil d9caa6ed24
Migrate to request specs in `/api/v1/admin/accounts` (#25563) 1 year ago
Daniel M Brasil 82beeb2f7e
Migrate to request specs in `/api/v1/admin/trends/links` (#25739) 1 year ago
Claire 71cfdd7865
Fix duplicate tests (#27395) 1 year ago
Daniel M Brasil 058f73a4f5
Add request specs for `/api/v1/reports` (#25475) 1 year ago
Daniel M Brasil bc6cd27d9e
Migrate to request specs in `/api/v1/followed_tags` (#25472) 1 year ago
Matt Jankowski fd9dea21d0
DB speedup in `API::` controller/request specs (#25516) 1 year ago
Daniel M Brasil ecdb31d479
Migrate to request specs in `/api/v1/favourites` (#25518) 1 year ago
Daniel M Brasil 7664e3b692
Migrate to request specs in `/api/v1/statuses/:status_id/source` (#25634) 1 year ago
Daniel M Brasil 4230d1ee0a
Migrate to request specs in `/api/v1/timelines/tag/:hashtag` (#25797) 1 year ago
Claire 40ba6e119b
Fix Vary headers not being set on some redirects (#27272) 1 year ago
Claire 828eebad48
Add `hide_collections`, `discoverable` and `indexable` attributes to credentials API (#26998) 1 year ago
Robert R George 20666482ef
Added admin api for managing tags (#26872) 1 year ago
Daniel M Brasil f337008819
Fix timeout on invalid set of exclusionary parameters in `/api/v1/timelines/public` (#26239) 1 year ago
Claire 191d302b7f
Refactor `Api::V1::ProfilesController` into two separate controllers (#26573) 1 year ago
Daniel M Brasil d24a87ce4f
Add ability to delete avatar or header picture via the API (#25124)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Daniel M Brasil 3a4d3e9d4b
Add `GET /api/v1/instance/languages` to REST API (#24443)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Emelia Smith e258b4cb64
Refactor: replace whitelist_mode mentions with limited_federation_mode (#26252) 1 year ago
Christian Schmidt ca342d4838
Add List-Unsubscribe email header (#26085) 1 year ago
Daniel M Brasil 812a84ff5f
Migrate to request specs in `/api/v2/filters` (#25721) 1 year ago
Matt Jankowski 50ff3d3342
Coverage for `Auth::OmniauthCallbacks` controller (#26147) 1 year ago
Claire e5f1000ad1
Fix CSP headers being unintendedly wide (#26105) 1 year ago
Christian Schmidt 4c18928a93
Wrong count in response when removing favourite/reblog (#24365)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Daniel M Brasil 59b38f9ee4
Migrate to request specs in `/api/v1/mutes` (#25622) 1 year ago
Daniel M Brasil 58bfe8c43a
Migrate to request specs in `/api/v1/bookmarks` (#25520) 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>
1 year ago
Daniel M Brasil 19208aa422
Migrate to request specs in `/api/v1/statuses/:status_id/favourite` (#25626) 1 year ago
Daniel M Brasil 6fb4a756ff
Migrate to request specs in `/api/v1/statuses/:status_id/bookmark` (#25624) 1 year ago
Daniel M Brasil 4859958a0c
Migrate to request specs in `/api/v1/polls` (#25596) 1 year ago
Daniel M Brasil 1aea938d3d
Migrate to request specs in `/api/v1/statuses/:status_id/pin` (#25635) 1 year ago
Daniel M Brasil 6cdc8408a9
Migrate to request specs in `/api/v1/emails/confirmations` (#25686) 1 year ago
Daniel M Brasil 8a1aabaac1
Migrate to request specs in `/api/v1/timelines/home` (#25743) 1 year ago
Claire 41f65edb21
Fix embed dropdown menu item for unauthenticated users (#25964) 1 year ago
Claire 94fbac77e7
Fix processing of media files with unusual names (#25788) 2 years ago
Daniel M Brasil 6ac271c2a0
Migrate to request specs in `/api/v1/suggestions` (#25540) 2 years ago
Daniel M Brasil e53eb38a8d
Migrate to request specs in `/api/v1/admin/account_actions` (#25514) 2 years ago
Daniel M Brasil 0a0a1f1495
Migrate to request specs in `/api/v1/tags` (#25439) 2 years ago
Daniel M Brasil b10c05e702
Migrate to request specs in `/api/v1/lists` (#25443) 2 years ago
Daniel M Brasil 24015ef0cc
Migrate to request specs in `/api/v1/domain_blocks` (#25414) 2 years ago
Daniel M Brasil 87aff5aad8
Migrate to request specs in `/api/v1/follow_requests` (#25411) 2 years ago
Daniel M Brasil a5b62e56d0
Migrate to request specs in `/api/v1/apps/verify_credentials` (#25404) 2 years ago
Daniel M Brasil a6407aa662
Migrate to request specs in `/api/v1/apps` (#25401) 2 years ago
Matt Jankowski 4c5f62de99
Extract shared examples from api specs (#25387) 2 years ago
fusagiko / takayamaki b19a695608
migrate test for `GET /api/v1/accounts/{account_id}` to request spec (#25322) 2 years ago
Daniel M Brasil 99216e34e5
Migrate to request specs in `/api/v1/admin/canonical_email_blocks` (#25330) 2 years ago
Daniel M Brasil b4e19f9610
Migrate to request specs in `/api/v1/admin/ip_blocks` (#25331) 2 years ago
Daniel M Brasil 4301d8cbb3
Migrate to request specs in `/api/v1/admin/domain_allows` (#25333) 2 years ago
Daniel M Brasil 841c220c40
Migrate to request specs in `/api/v1/admin/domain_blocks` (#25335) 2 years ago
Daniel M Brasil 0e200d4e2f
Migrate to request specs in `/api/v1/admin/reports` (#25355) 2 years ago
Daniel M Brasil 4aff1d2974
Migrate to request specs in `/api/v1/admin/email_domain_blocks` (#25337) 2 years ago
Matt Jankowski c9f980b268
Add request spec for backups download (#25099) 2 years ago
Daniel M Brasil b473df9a14
Improve test coverage for `/api/v1/featured_tags` (#25076) 2 years ago
Matt Jankowski bdcd8a9e88
Misc spec cleanup (#24822) 2 years ago
Matt Jankowski 97385f27bd
Fix Performance/RedundantEqualityComparisonBlock cop (#24799) 2 years ago
Claire 1eb51bd749
Add request specs for caching behavior (#24592) 2 years ago
Matt Jankowski d00e45a7d3
Fix Rails/I18nLocaleAssignment cop (#24693) 2 years ago
João Pedro Marques 8f6e290c7a
Adds new follower/following routes (#24601) 2 years ago
Claire 276c39361b
Fix anonymous visitors getting a session cookie on first visit (#24584) 2 years ago
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs (#23790) 2 years ago
Nick Schonning aef0051fd0
Enable Rubocop HTTP status rules (#23717) 2 years ago
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 2 years ago
Eugen Rochko 839f893168
Change public accounts pages to mount the web UI (#19319)
* Change public accounts pages to mount the web UI

* Fix handling of remote usernames in routes

- When logged in, serve web app
- When logged out, redirect to permalink
- Fix `app-body` class not being set sometimes due to name conflict

* Fix missing `multiColumn` prop

* Fix failing test

* Use `discoverable` attribute to control indexing directives

* Fix `<ColumnLoading />` not using `multiColumn`

* Add `noindex` to accounts in REST API

* Change noindex directive to not be rendered by default before a route is mounted

* Add loading indicator for detailed status in web UI

* Fix missing indicator appearing while account is loading in web UI
2 years ago
Eugen Rochko 58d5b28cb0
Remove previous landing page (#19300) 2 years ago
Claire b358229834
Further preparation for Rails 6 (#15916)
* Use ActiveRecord::Result#to_ary instead of deprecated to_hash

They do the same thing, and to_hash has been removed from Rails 6.1

* Explicitly name polymorphic indexes to workaround a bug in Rails 6.1

cf. https://github.com/rails/rails/issues/41693

* Fix incorrect usage of “foreign_key” in migration script

* Use `ActiveModel::Errors#delete` instead of deprecated clear method

* Fix link headers tests on Rails 6.1

Rails 6.1 adds values to the Link header by default, thus it is not a
LinkHeader object anymore. Fix the test to parse the Link header instead
of assuming it is a LinkHeader.
4 years ago
Claire 43eff898a0
Prepare Mastodon for Rails 6 (#15911)
* Fix misuse of foreign_type

* Fix use of removed "add_template_helper"

* Use response.media_type instead of response.content_type in tests

* Fix CSV export controller test on Rails 6

Rails 6 sets a "filename*" field in the Content-Disposition header to
explicitly encode the filename as UTF-8.

This changes checks the first part of the Content-Disposition header so
it matches in both Rails 5 and Rails 6.

* Fix emoji formatting with Rails 6

* Make emoji output more idiomatic and robust

* Switch from redis-rails gem to built-in Rails redis cache storage
4 years ago
Eugen Rochko 510e184216
Fix localization test failing due to order of locale definitions (#12393) 5 years ago
Eugen Rochko 8b9d0a0533
Remove XML version of Webfinger and remove links to Atom feeds (#11460)
Fix #11453
6 years ago
Eugen Rochko 63c7fe8e48
Refactor controllers for statuses, accounts, and more (#11249) 6 years ago
Eugen Rochko 65fffeac3f
Redesign landing page (#10232) 6 years ago
Yamagishi Kazutoshi d10447c3a8 Use raw status code on have_http_status (#7214) 7 years ago
Eugen Rochko e19eefe219 Redesign the landing page, mount public timeline on it (#4122)
* Redesign the landing page, mount public timeline on it

* Adjust the standalone mounted component to the lacking of router

* Adjust auth layout pages to new design

* Fix tests

* Standalone public timeline polling every 5 seconds

* Remove now obsolete translations

* Add responsive design for new landing page

* Address reviews

* Add floating clouds behind frontpage form

* Use access token from public page when available

* Fix mentions and hashtags links, cursor on status content in standalone mode

* Add footer link to source code

* Fix errors on pages that don't embed the component, use classnames

* Fix tests

* Change anonymous autoPlayGif default to false

* When gif autoplay is disabled, hover to play

* Add option to hide the timeline preview

* Slightly improve alt layout

* Add elephant friend to new frontpage

* Display "back to mastodon" in place of "login" when logged in on frontpage

* Change polling time to 3s
8 years ago
unarist abbdacedc5 Fix locale related specs (#3707)
* Use I18n.locale instead of ":en"
* Reset I18n.locale value after locale changing tests
8 years ago
Yamagishi Kazutoshi 0a0b9a271a Improve RuboCop rules (compatibility to Code Climate) (#3636)
08f8de84eb/Gemfile.lock (L38)
Code Climate is using RuboCop v0.46.0.

Change several rules to maintain compatibility.
8 years ago
Matt Jankowski f9d398e8fb Remove the react-rails gem (#2801)
* Remove react-rails gem

* Fix broken view spec
8 years ago
Matt Jankowski 8bac0350d1 Restful refactor of accounts/ routes (#2133)
* Add routing specs for accounts followers and following actions

* Use more restful route naming for public account follow pages

Moves two actions:
- accounts#followers to accounts/follower_accounts#index
- accounts#following to accounts/following_accounts#index

Adds routing spec to ensure prior URLs are preserved.
8 years ago
Matt Jankowski 21a767dcfa Improve handling of HTTP_ACCEPT for webfinger (#2008)
This change includes:

- Improve the spec coverage for incoming request to the webfinger action
- For requests without an accept header (ie, what a browser might look like),
  return a JSON response.
- For requests with an explicit format of xml or json, return that format.
- For requests using an accept header, return that format.

Also adds failing spec showing webfinger does not return xml, which covers the
issue described in: https://github.com/tootsuite/mastodon/issues/1983
8 years ago
Matt Jankowski f5cd138323 Improve i18n chooser (#1804)
* Add locale spec with failing locale plus region check

* Use a more accurate locale when supplied by browser headers

Previously we were using a matching option which would use the first locale
available which matched the locale portion, even if a region was specified.

This changes to first try to find an exact match, and then fall back to the
region, and then fall back to the  default.

* Clean up default_locale method
8 years ago
Matt Jankowski 137100dcf3 Clean up well-known routes/controllers (#1649)
* Add request spec for host meta route returning xml

* Add routing spec for xrd routes

* Update well-known routes

* Move webfinger and host-meta actions to their own controllers
8 years ago
Matt Jankowski b352a8e5d4 Default to json type for webfinger requests (#1583) 8 years ago
Matt Jankowski 71706f21c2 Ignore implied formats for catch all route requests (#1340)
A request to `/test` would show the custom 404 page, but a request to
`/test.test` would return a 404 with an empty body.

This change ignores the format on incoming catch all route requests, so that the
html 404 page is returned on these requests.
8 years ago