about summary refs log tree commit diff
path: root/spec
AgeCommit message (Collapse)Author
2017-06-23Revocable sessions (#3616)Sorin Davidoi
* feat: Revocable sessions * fix: Tests using sign_in * feat: Configuration entry for the maximum number of session activations
2017-06-23Add important test for full-width hashtags (#3911)Eugen Rochko
2017-06-23Remove unused variables (#3906)Yamagishi Kazutoshi
2017-06-22Some minor change and spec for Account (#3813)Akihiko Odaki (@fn_aki@pawoo.net)
* Introduce domains method to Account relation Account had followers_domains method, which was excessively specific. Let relation of Account have domains method instead. * Move follow_mapping in Account to AccountInteractions * Introduce shared examples for AccountAvatar inclusion * Cover Account more
2017-06-22Fix regression from #3842 (#3892)Eugen Rochko
* Fix regression from #3842 Simplify the query by omitting all direct statuses. Private statuses are allowed because they are from accounts we are following (so by definition) Resolves #3887 (alternative) * Adjust test
2017-06-20Filter direct statuses in Status.as_home_timeline (#3842)Akihiko Odaki (@fn_aki@pawoo.net)
The classes using Status.as_home_timeline, namely Feed and PrecomputeFeedService are expected to filter direct statuses as FanOutWriteService does, but their filtering were incomplete or missing. This commit solves the problem by filtering direct statuses in as_home_timeline as the other similar methods such as as_public_timeline does.
2017-06-20Update fabricator for MediaAttachment to attach a file according to type (#3862)Akihiko Odaki (@fn_aki@pawoo.net)
This fixes a random spec failures since commit d55f207274648369cba30ff001aa3e354fa30dca.
2017-06-20Fix RTL detection on Ruby side (#3867)unarist
This fixes below bugs: * pipe characters being counted as RTL character * only first word being checked
2017-06-19setting-for-account-deletable (#3852)masarakki
2017-06-19Cover Block more (#3837)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-19Cover DomainBlock more (#3838)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-19Cover Export more (#3840)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-19Rename FollowRemoteAccountService to ResolveRemoteAccountService (#3847)Eugen Rochko
Rename Activitypub to ActivityPub
2017-06-19Cover Favourite more (#3841)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-18Spec AccountDomainBlock (#3816)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-17Whitelist allowed classes for federated statuses (#3810)nightpool
* Whitelist allowed classes for federated statuses Allowed classes are currently: - Any microformats class (h/p/u/dt/e-*) - the classes mention, hashtag, ellipses and invisible. this last one is somewhat suspect, but Mastodon currently uses it to render hidden link text. resolved #3790 * Fix code style
2017-06-17Spec UserMailer (#3757)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-15Fix regression from #3490 - filter out hidden statuses from ↵Eugen Rochko
ancestors/descendants even if the viewer is anonymous (#3752)
2017-06-14Fix account delete form not accepting password, update suspended (#3745)Eugen Rochko
account before removing content for quicker feedback to end-users
2017-06-14Batched remove status service (#3735)Eugen Rochko
* Make Pubsubhubbub::DistributionWorker handle both single stream entry arguments, as well as arrays of stream entries * Add BatchedRemoveStatusService, make SuspendAccountService use it * Improve method names * Add test * Add more tests * Use PuSH payloads of 100 to have a clear mapping of 1000 input statuses -> 10 PuSH payloads It was nice while it lasted
2017-06-14Account deletion (#3728)Eugen Rochko
* Add form for account deletion * If avatar or header are gone from source, remove them * Add option to have SuspendAccountService remove user record, add tests * Exclude suspended accounts from search
2017-06-14Fix #2619 - When redis feed is empty, fall back to database (#3721)Eugen Rochko
* Fix #2619 - When redis feed is empty, fall back to database * Use redis value to return feed from database only while RegenerationWorker hasn't finished running * Fix specs * Replace usage of reject!
2017-06-12Fix locale related specs (#3707)unarist
* Use I18n.locale instead of ":en" * Reset I18n.locale value after locale changing tests
2017-06-11Fix removal of status sending the original status to mentioned users instead ↵Eugen Rochko
of delete Salmon (#3672) * Fix removal of status sending the original status to mentioned users instead of delete Salmon, add test * Create remove_status_service_spec.rb
2017-06-11Localize date in digest and cover NotificationMailer more (#3694)Akihiko Odaki (@fn_aki@pawoo.net)
* Localize date in digest * Cover NotificationMailer more
2017-06-11Make sure email is case insensitive on all places (#3688)René Klačan
When case insensitivity is enabled via devise's `config.case_insensitive_keys` then `.find_for_authentication` method needs to be used instead of `.find_by` because second mentioned returns `nil` when valid email with different cases is passed. More info https://github.com/plataformatec/devise/wiki/How-To:-Use-case-insensitive-emails
2017-06-10Improve default language decision and spec (#3351)Akihiko Odaki (@fn_aki@pawoo.net)
* Improve default language decision This change allows to takes account of accepted language determined by the user agent even if the custom default locale of the instance is configured. * Cover Localized more * Fix code style
2017-06-10Move create/destroy actions for api/v1/statuses to namespace (#3678)Matt Jankowski
Each of mute, favourite, reblog has been updated to: - Have a separate controller with just a create and destroy action - Preserve historical route names to not break the API - Mild refactoring to break up long methods
2017-06-09Move reblogged_by and favourited_by actions out of api/v1/statuses and into ↵Matt Jankowski
unique controllers (#3646) * Add specs for api statuses routes * Update favourited_by and reblogged_by api routes * Move methods into new controllers * Use load_accounts methods to simplify index actions * Clean up load_accounts methods * Clean up link header generation * Check for link headers in specs * Remove unused actions from api/v1/statuses controller * Remove specs for moved actions
2017-06-09Language detection defaults to nil (#3666)Matt Jankowski
* Default to nil for statuses.language * Language detection defaults to nil instead of instance UI default
2017-06-08Fix db:seed - only run some validations when the field was changed (#3592)Eugen Rochko
* Fix db:seed - only run some validations when the field was changed * Add tests
2017-06-08Improve RuboCop rules (compatibility to Code Climate) (#3636)Yamagishi Kazutoshi
https://github.com/codeclimate/codeclimate-rubocop/blob/08f8de84ebfb39caa96391e23816877278f6441c/Gemfile.lock#L38 Code Climate is using RuboCop v0.46.0. Change several rules to maintain compatibility.
2017-06-07Clean up for api/base controller (#3629)Matt Jankowski
* Move ApiController to Api/BaseController * API controllers inherit from Api::BaseController * Add coverage for various error cases in api/base controller
2017-06-07Use "match_array" only for order independent assertions (#3626)unarist
2017-06-07Coverage improvement and concern extraction for rate limit headers in API ↵Matt Jankowski
controller (#3625) * Coverage for rate limit headers * Move rate limit headers methods to concern * Move throttle check to condition on before_action * Move match_data variable into method * Move utc timestamp to separate method * Move header setting into smaller methods * specs cleanup
2017-06-06Fix 500 errors on searching invalid URLs (#3613)unarist
2017-06-06Fix tag search order and not to use tsvector (#3611)unarist
* Sort results by the name * Switch search method to simple `LIKE` matching instead of tsvector/tsquery Previously we used scores from ts_rank_cd() to sort results, but it didn't work because the function returns same score for all results. It's not for calculate similarity of single words. Sometimes this bug even push out exact matching tag from results. Additionally, PostgreSQL supports prefix searching with standard btree index. Using it offers simpler code, but also less index size and some speed.
2017-06-06Add quotes ESLint rules (#3602)Yamagishi Kazutoshi
* Add quotes ESLint rule * Add jsx-quotes ESlint rule * Sort ESLint rules
2017-06-05Introduce StatusThreadingConcern (#3490)Matt Jankowski
* Add a StatusFilter class to identify visibility of statuses by accounts * Extract StatusThreadingConcern from Status * Clarify purpose of checking for nil account
2017-06-05Redirect to streaming_api_base_url (#3579)Daigo 3 Dango
* Redirect to streaming_api_base_url When Rails receives a request to streaming API, it most likely means that there is another host which is configured to respond to it. This is to redirect clients to that host if `STREAMING_API_BASE_URL` is set as another host. * Use the new Ruby 1.9 hash syntax
2017-06-05Fix randomly fail (regression from #3560) (#3580)Yamagishi Kazutoshi
2017-06-05Skip image length check (regression from #3528) (#3581)Yamagishi Kazutoshi
2017-06-05Don't follow account if it's already followed (#3575)René Klačan
Closes https://github.com/tootsuite/mastodon/issues/3102
2017-06-05Added support for configurable reserved usernames (fix of #1382) (#3566)Eugen Rochko
* Added support for configurable reserved usernames * Added reserved usernames from mastodon issue 1355 * Fix reserved usernames
2017-06-04Cover WebfingerResource more (#3560)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-04Spec ScopedSettings (#3559)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-04Remove some code in TagManager and spec (#3547)Akihiko Odaki (@fn_aki@pawoo.net)
* Do not fall back to StreamEntry if object_type is unavailable in TagManager Since 6d6a429af8fe4bd92ed497f401676353fdc603e0, when Status, the only model with stream_entry, and StreamEntry got its own logic in uri_for and url_for, the purpose of the fallbacks to activity_type of StreamEntry became unclear. This commit removes the fallbacks. When adding another model with stream_entry in future, consider to update uri_for and url_for. * Cover TagManager more
2017-06-04Spec InlineRablScope (#3542)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-04Spec HashObject (#3544)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-04A minor change for ProviderDiscovery and spec (#3543)Akihiko Odaki (@fn_aki@pawoo.net)
* Do not default the format in ProviderDiscovery The format should be determined when discovering, as it is in the current implementation, and it is a flaw if it is not determined. * Spec ProviderDiscovery