about summary refs log tree commit diff
path: root/spec
AgeCommit message (Collapse)Author
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
2017-06-04Remove some arguments of Formatter.instance.format and spec (#3541)Akihiko Odaki (@fn_aki@pawoo.net)
* Remove some arguments of Formatter.instance.format * Improve spec for Formatter
2017-06-04Spec Extractor (#3540)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-04Spec action verification of StreamEntryFinder (#3549)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-03Remove redundant code in AtomSerializer and spec (#3528)Akihiko Odaki (@fn_aki@pawoo.net)
* Remove redundant status.reply? in AtomSerializer#object * Cover AtomSerializer more
2017-06-03Fix spec for #2388 (#3526)Yamagishi Kazutoshi
2017-06-01Spec response for forgery (#3248)Akihiko Odaki (@fn_aki@pawoo.net)
Remove protect_from_forgery in ApiController, which is disabled by the following skip_before_action, as well.
2017-06-01Improve tests for JavaScript (#3496)Yamagishi Kazutoshi
- Upgrade dependencies - chai (3.5.0 -> 4.0.1) - chai-enzyme (0.6.1 -> 0.7.1) - sinon (2.2.0 -> 2.3.2) - Change extensions from .jsx to .js - Don't assign `React` to `global` - Check code format using ESLint
2017-06-01Add scenarios for log in (#3497)Yamagishi Kazutoshi
2017-06-01Remove usernames and hashtags from language detection (#3503)Matt Jankowski
* Add failing specs for hashtag and username extraction in language detector * Remove usernames and hashtags from text before language detection * Handle multiple instances of special case, and reduce whitespace
2017-06-01Handle nil and blank cases in Account finders (#3500)Matt Jankowski
2017-05-31Spec coverage and refactor for the api/v1/accounts controllers (#3451)Matt Jankowski
2017-05-31Move admin/pubsubhubbub controller to admin/subscriptions (#3442)Matt Jankowski
2017-05-31Improve spec coverage and clean up api/v1/blocks controller (#3464)Matt Jankowski
2017-05-31Improve spec coverage and clean up api/v1/follow_requests controller (#3465)Matt Jankowski
2017-05-31Improve spec coverage and clean up api/v1/domain_blocks controller (#3466)Matt Jankowski
2017-05-31Improve spec coverage and clean up api/v1/favourites controller (#3472)Matt Jankowski
2017-05-31Expand spec coverage and refactor the `Account.find_` methods (#3485)Matt Jankowski
* Move specs for account finder methods to concern spec * Move account finder methods to concern * Improve spec wording * Use more explicit comparison to ensure correct return value * Add coverage for .find_local! and .find_remote! * Add some methods to the finder * Use arel on matching_username method * Avoid ternary in matching domain method * Simplify finder methods * Use an AccountFinder class to simplify lookup
2017-05-31Improve spec coverage and clean up api/v1/mutes controller (#3481)Matt Jankowski
2017-05-31Refactor and spec coverage for api/v1/timelines actions (#3482)Matt Jankowski
2017-05-31Hold value of I18n.locale with ApplicationHelperSpec (#3474)Yamagishi Kazutoshi
2017-05-31Keep ENV['LOCAL_HTTPS'] with ApplicationControllerSpec (fix random fail) (#3479)Yamagishi Kazutoshi
* Keep ENV['LOCAL_HTTPS'] with ApplicationControllerSpec (fix random fail) * use climate_control
2017-05-30Improve spec coverage and clean up api/v1/media controller (#3467)Matt Jankowski
2017-05-31Clean up api/subscriptions controller (#3448)Matt Jankowski
2017-05-30Add status destroy authorization to policy (#3453)Jack Jennings
* Add status destroy authorization to policy * Create explicit unreblog status authorization
2017-05-30Improve api oembed controller (#3450)Matt Jankowski
* Add StreamEntryFinder class to parse URLs * Use StreamEntryFinder and clean up api/oembed controller
2017-05-30Clean up api/salmon controller (#3449)Matt Jankowski