Commit Graph

178 Commits (e031fd60ad9ee492fbbda319eaeb213098898d03)

Author SHA1 Message Date
Akihiko Odaki 67bc58dd60 Use around hook to restore context in Admin::SettingsController spec (#3428) 7 years ago
Jack Jennings 3a2003ba86 Extract authorization policy for viewing statuses (#3150) 7 years ago
Akihiko Odaki 922fb74197 Remove methods from ObfuscateFilename and spec (#3347)
* Remove methods from ObfuscateFilename

* Spec ObfuscateFilename
7 years ago
Akihiko Odaki 7bf2d6cb06 Spec Auth::ConfirmationsController (#3348) 7 years ago
Akihiko Odaki 11e5c965c3 Spec AccountControllerConcern (#3349) 7 years ago
Akihiko Odaki 34157d118c Cover Admin::ReportsController more (#3346) 7 years ago
Akihiko Odaki 7b92950f1c Cover InstancesController more (#3342) 7 years ago
Akihiko Odaki 97d7028c31 Cover Admin::SuspensionsController more (#3350) 7 years ago
Akihiko Odaki a7f2961621 Spec Auth::PasswordsController (#3352) 7 years ago
Akihiko Odaki 00dda99789 Spec Admin::ResetsController calls send_reset_password_instructions (#3354) 7 years ago
Akihiko Odaki 2e27ce3b61 Spec #destroy feature of Admin::TwoFactorAuthenticationsController (#3355) 7 years ago
Akihiko Odaki 2c10c5a069 Coever Admin::SilencesController more (#3356) 7 years ago
Akihiko Odaki bd4dd4c4a0 Cover Settings::ExportsController more (#3358) 7 years ago
Akihiko Odaki 7d33b60f3f Cover Oauth::AuthorizedApplicationsController (#3359) 7 years ago
Akihiko Odaki aecce5694b Cover Oauth::AuthorizationsController more (#3361) 7 years ago
Akihiko Odaki 0e4ca51951 Cover Settings::TwoFactorAuthenticationsController more (#3376) 7 years ago
Akihiko Odaki dde043f6cd Cover WellKnown::HostMetaController more (#3382) 7 years ago
Akihiko Odaki c778a60e4f Cover Settings::TwoFactorAuthentication::RecoveryCodesController more (#3383) 7 years ago
Akihiko Odaki c347327d54 Spec Settings::Exports (#3384)
* Spec output of Settings::Exports::BlockedAccountsController

* Spec output of Settings::Exports::FollowingAccountsController

* Spec output of Settings::Exports::MutedAccountsController

* Spec Settings::Exports::BaseController

This commit removes duplicate specs in classes inheriting
Settings::Exports::BaseController as well.
7 years ago
Akihiko Odaki fd328cf6e8 Cover WellKnown::WebfingerController more (#3385) 7 years ago
Akihiko Odaki 7b473d7514 Cover Settings::TwoFactorAuthentication::ConfirmationsController more (#3386) 7 years ago
Akihiko Odaki 7a281c477a Cover Admin::PubSubHubHubController more (#3343) 7 years ago
Atsushi Yamamoto 402c19a924 Add preference setting for delete toot modal (#3368)
* Set delete_modal preference to true by default
* Does not show confirmation modal if delete_modal is false
* Add ja translation for preference setting page
7 years ago
Akinori MUSHA f6a93fc150 Go to root after login in single user mode (#3289)
In single user mode, visitors are redirected to the single user's
profile page.  So, if you are the owner without a session, you start
from that page, click the login button and authenticate yourself
expecting you'll soon get started with the home page, but in reality
you'll get redirected back to where you started from -- your own
profile page.

This fixes the behavior by redirecting you home after login if you
have started from your own profile page.
8 years ago
Akihiko Odaki 019f3377bb Spec Admin::BaseController (#3328) 8 years ago
Akihiko Odaki a8736aab7a Cover TagsController more (#3306) 8 years ago
Akihiko Odaki 5d9f479538 Cover HomeController more (#3258) 8 years ago
Eugen Rochko 2ca1f0737a Fix Devise destroy method being available to delete user record (#3266)
(You may think that we need account deletions, but this way would've just orphaned the db records)
8 years ago
alpaca-tc 7ee5fc5d68 Toggle sensitive from admin page (#3261) 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
Akihiko Odaki 152b4d54e8 Cover StatusesController more (#3259) 8 years ago
Akihiko Odaki ea2ef16ea4 Cover StreamEntriesController more and remove redundant instructions (#3257)
* Cover StreamEntriesController more

* Remove redundant instructions in StreamEntriesController
8 years ago
Akihiko Odaki 1d3e0a5060 Spec AuthorizeFollowsController assigns @account (#3246)
@account is used by the view.
8 years ago
Akihiko Odaki bf575a1f5e Introduce recent to Follow (#3247)
Introduce recent to Follow, as Account and other models have.
This change also adds specs for the scope and the dependents.
8 years ago
Akihiko Odaki 8fd174298d 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
8 years ago
Matt Jankowski a28ce13b3e Coverage for api/web/settings controller (#3238) 8 years ago
Akihiko Odaki bda7391221 Cover ApplicationController more in spec (#3230) 8 years ago
Akihiko Odaki b9e8ffbd12 Cover AccountUnfollowController more in spec (#3228) 8 years ago
Akihiko Odaki 422e4d897b Cover AccountFollowController more in spec (#3227) 8 years ago
Akihiko Odaki cb2707776f Cover AboutController more in spec (#3226) 8 years ago
Immae a94c152fd3 Allow alternate domains for mastodon handlers (#3187) 8 years ago
Akihiko Odaki aa662cecad single_user_mode? always returns boolean (#3215)
This change also adds a specification for the method.
8 years ago
Matt Jankowski 8f4b7c1820 Filter languages with opt out (#3175)
* Remove allowed_languages and add filtered_languages

* Use filtered_languages instead of allowed_languages
8 years ago
Jack Jennings 8c5eaf7ae9 Enable and fill in JSON response test in API::AccountsController (#3157) 8 years ago
Matt Jankowski b6f6152e26 Add coverage for api/v1 controllers (#3155) 8 years ago
Eugen Rochko 620d0d8029 Account domain blocks (#2381)
* Add <ostatus:conversation /> tag to Atom input/output

Only uses ref attribute (not href) because href would be
the alternate link that's always included also.

Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.

* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute

Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle

* Display "Dismiss notifications" on all statuses in notifications column, not just own

* Add "muted" as a boolean attribute on statuses JSON

For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested

Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column

* Up max class length

* Remove pending test for conversation mute

* Add tests, clean up

* Rename to "mute conversation" and "unmute conversation"

* Raise validation error when trying to mute/unmute status without conversation

* Adding account domain blocks that filter notifications and public timelines

* Add tests for domain blocks in notifications, public timelines
Filter reblogs of blocked domains from home

* Add API for listing and creating account domain blocks

* API for creating/deleting domain blocks, tests for Status#ancestors
and Status#descendants, filter domain blocks from them

* Filter domains in streaming API

* Update account_domain_block_spec.rb
8 years ago
Eugen Rochko d0dd9eb5b5 Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output

Only uses ref attribute (not href) because href would be
the alternate link that's always included also.

Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.

* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute

Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle

* Display "Dismiss notifications" on all statuses in notifications column, not just own

* Add "muted" as a boolean attribute on statuses JSON

For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested

Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column

* Up max class length

* Remove pending test for conversation mute

* Add tests, clean up

* Rename to "mute conversation" and "unmute conversation"

* Raise validation error when trying to mute/unmute status without conversation
8 years ago
Eugen Rochko 65f9db73b0 Fix #2027 - Accept own ID for remote follow with and without preceding @ (#2991)
* Fix #2027 - Accept own ID for remote follow with and without preceding @
Fix #2177 - Omit leading "acct:" in remote follow redirect template expansion

* Fix test
8 years ago
Matt Jankowski 04166c4a35 Specs for API push controller, with refactor (#2926)
* Coverage for api push controller

* Refactor the api/push controller
8 years ago
Matt Jankowski bba537a7be Improve allowed language handling (#2897)
* Dont allow empty value in user allowed languages

* Sanitize language input to reject blank values in array
8 years ago