about summary refs log tree commit diff
path: root/spec/models
AgeCommit message (Collapse)Author
2017-05-02Add option to disable two factor auth in admin accounts panel. (#2584)Kaylee
* Add option to disable two factor auth in admin accounts panel. Closes #2578 * Add @mjankowski's suggestions. * Moves destroy actions behind User#disable_two_factor! * Adds spec coverage for Admin:TwoFactorAuthenticationsController and User#disable_two_factor!
2017-05-02Fix subscription expiration condition (#2715)Yamagishi Kazutoshi
* Fix subscription expiration condition * dry and add spec
2017-05-01Filter on allowed user language preferences (#2361)Matt Jankowski
* Naive approached to timeline filtering * Convert allowed_languages into a db column * Allow users to choose languages to see statuses in * Style list items as two columns * Add a hint to explain language filtering preference
2017-04-30Reports spec for media attachments, clean up method (#2660)Matt Jankowski
* Add coverage for Report#media_attachments * Direct query on media attachment
2017-04-30Revert "Use PostgreSQL inheritance for blocks and mutes (#2520)" (#2634)Akihiko Odaki
This reverts commit 5135d609b774b177d3d3894b176a822d86b73d3c.
2017-04-30Use PostgreSQL inheritance for blocks and mutes (#2520)Akihiko Odaki
2017-04-29Add tests to the Feed model (#2594)Joël Quenneville
This adds a test for the `Feed#get` method. While the data transformations in `Feed#get` may seem redundant, they are important to maintain the order from Redis. The tests I wrote will fail if someone tries to refactor away this "redundancy" (as I tried to do in the first iteration of this change).
2017-04-28More status specs (#2564)Matt Jankowski
* Add rough outline of coverage needed for public timeline * Specs for visibility, replies, boosts * Specs for silenced account * Specs for local_only option * Specs for blocks and mutes * Add tentative spec around including other silenced account statuses * Add with_public_visibility scope * Add simple coverage for tag_timeline * Tag timeline includes replies * Replace tag.statuses with a tagged_with scope in tag timeline method * Use with_public_visibility in tag timeline * Extract common scope between public and tag timelines to method * Extract local domain check to local_only scope * Extract local_only check to starting scope method * Move list of excluded from timeline account ids to account model * Simplify excluded accounts list on account model * Only join accounts when needed * Rename method for account specific filtering * Extract method for account exclusions * Fix bug where silenced accounts were not including statuses from other silenced accounts * DRY up filter application from account or no account * timeline_scope can be private * Add spec showing that account can find its excluded accounts ids * Add spec which fails if local_only does not have a left outer join * rubocop
2017-04-26Add spec for Status.as_home_timeline (#2451)Matt Jankowski
2017-04-26Add media dimensions (#2448)Francis Chong
* Fixes #1985 - add migration AddMediaAttachmentMeta, which add meta field to media_attachments - before saving attachment, set file meta if needed - add meta in api * add spec * align the “size” format for image and video * fix code climate * fixes media_attachment_spec.rb
2017-04-26Stricter whitelist rules (#2213)Guillaume Lo Re
* Stricter whitelist rules * Linting * Added spec for blacklisting * Test subdomain blacklist on domain whitelist * No need to split * Change spec name
2017-04-24Add more FeedManager#filter? tests (#2413)Eugen
2017-04-23Admin UI for confirming users (#2245)Ash Furrow
* Shows confirmed status in list. * Adds ability to confirm users in admin UI. * Added new english translations. * Addresses feedback from #2245. * More feedback.
2017-04-21User settings mutation (#2270)Matt Jankowski
* Add user spec for settings, highlight global default mutation issue * Fix mutation issue caused by settings/preferences spec
2017-04-19Fix #2108 - Fix gif uploads (#2171)Eugen
* Fix #2108 - Fix gif uploads Add specs for media attachment gifv conversion * Add ffmpeg to travis * Make travis install ffmpeg, not libav * Switch travis to trusty
2017-04-18Instances list in admin (#2095)Matt Jankowski
* Add admin/instances index action * Add link to instances admin page * View lists instances * Instances, grouped by domain, ordered by count * Use Account.remote scope * Extract method: Account.by_domain_accounts
2017-04-18Admin reports with accounts (#2092)Matt Jankowski
* Add a ReportFilter class * Add reports and targeted_reports relationships to Account * Use ReportFilter from admin/reports controller * Link to admin/reports filtered views from admin account show view * Add indexes to reports.account_id and reports.target_account_id
2017-04-18Remove unused methods (#1730)Matt Jankowski
* Remove unused method #set_counters_maps from api controller * Remove unused method #set_account_counters_maps from api controller * Remove unused method Account#followers_domains * Remove unused User.prolific scope * Add mastodon:users:admins task to list all admin emails * Use interpolated query style in Account.triadic_closures * Coverage for Account.triadic_closures
2017-04-15Add recovery code support for two-factor auth (#1773)Patrick Figel
* Add recovery code support for two-factor auth When users enable two-factor auth, the app now generates ten single-use recovery codes. Users are encouraged to print the codes and store them in a safe place. The two-factor prompt during login now accepts both OTP codes and recovery codes. The two-factor settings UI allows users to regenerated lost recovery codes. Users who have set up two-factor auth prior to this feature being added can use it to generate recovery codes for the first time. Fixes #563 and fixes #987 * Set OTP_SECRET in test enviroment * add missing .html to view file names
2017-04-14Admin reports controller improvements (#1714)Matt Jankowski
* Simplify admin/reports controller filtering for index * Rename parameter to resolved * Fix issue where reports view could not access filter_link_to * Add coverage for admin/reports controller * DRY up resolution of related reports for target account * Clean up admin/reports routes * Add Report#statuses method * DRY up current account action taken params * Rubocop styles
2017-04-13Fix csv export coverage in export spec (#1691)Matt Jankowski
2017-04-13Admin accounts controller cleanup (#1664)Matt Jankowski
* Remove unused account_params method in admin/accounts controller * Introduce AccountFilter to find accounts * Use AccountFilter in admin/accounts controller * Use more restful routes admin silence and suspension area * Add admin/silences and admin/suspensions controllers
2017-04-13Remove pending specs for methods that dont exist (#1658)Matt Jankowski
* Remote spec for non-existent entry_classes helper method This method no longer exists, and is handled by a local variable in a partial instead. * Remove spec for non-existent Account#ping! method
2017-04-11Refactor exports controller (#1567)Matt Jankowski
* Add basic coverage for settings/exports controller * Remove unused @account variable from settings/exports controller * Add coverage for download export actions * Remove deprecated `render :text` in favor of `send_data` for csv downloads * Add model to handle exports * Use Export class in settings/exports controller * Simplify settings/exports controller methods * Move settings/export to more restful routes
2017-04-11When avatar/header are GIF, generate static versions (#1428)Eugen
* When avatar/header are GIF, generate static versions. Account API returns "avatar"/"avatar_static", "header"/"header_static" Static version is the same as original for other cases Web UI de-animates avatars in toots, lists of users Fix #441, fix #596, prerequisite for #1064 * Fix JS test * Add rake task to generate static avatars/headers from GIF ones, add test
2017-04-10Clean up generation of account webfinger string (#1477)Matt Jankowski
* Consolidate webfinger string creation under Account#to_webfinger_s * Introduce Account#local_username_and_domain for consolidation
2017-04-09Search cleanup (#1333)Matt Jankowski
* Clean up SQL output in Tag and Account search methods * Add basic coverage for Tag.search_for * Add coverage for Account.search_for * Add coverage for Account.advanced_search_for
2017-04-07Merge pull request #1184 from thoughtbot/extract-proper-statusEugen
DRY up reblog vs original status check
2017-04-07Implement pending specs on StatusJoël Quenneville
Implement the two pending specs on `Status`: `reblogs_count` and `favourites_count`.
2017-04-07DRY up reblog vs original status checkJoël Quenneville
Checking reblog vs original status was happening in multiple places across the app. For views, this logic was encapsulated in a helper method named `proper_status` but in the other layers of the app, the logic was duplicated. Because the logic is used at all layers of the app, we extracted it into a `Status#proper` method on the model and changed all uses of the logic to use this method. There is now a single source of truth for this condition. We added test coverage to untested methods that got refactored.
2017-04-05Fix specEugen Rochko
2017-04-05Merge branch 'master' into add_more_tests_to_modelsEugen
2017-04-05update account_specSamy KACIMI
2017-04-05add more tests to modelsSamy KACIMI
2017-04-04[#817] Add email whitelistPete Keen
This adds the ability to filter user signup with a whitelist instead of or in addition to a blacklist. Fixes #817
2017-03-30Import feature for following/blocking lists (addresses #62, #177, #201, #454)Eugen Rochko
2017-03-05Fix wrongful matching of last period in extended usernamesEugen Rochko
Fix anchor tags in some wikipedia URLs being matches as a hashtag
2017-03-01Mute button progress so far. WIP, doesn't entirely work correctly.Kit Redgrave
2017-02-14Adding POST /api/v1/reports API, and a UI for submitting reportsEugen Rochko
2017-02-12Stop trying to shoehorn all Salmon updates into the poor database-connectedEugen Rochko
StreamEntry model. Simply render Salmon slaps as they are needed
2017-02-11Fix semantics of follow requests another slapsEugen Rochko
2017-02-05Fix #61 - Add list of blocked users to the UI; clean up failed push ↵Eugen Rochko
notifications API Try to fix Travis CI setup
2017-01-29API for apps to register for push notificationsEugen Rochko
2017-01-20Fix #463 - Fetch and display previews of URLs using OpenGraph tagsEugen Rochko
2017-01-09Persist UI settings, add missing localizations for GermanEugen Rochko
2016-12-22Follow call on locked account creates follow request insteadEugen Rochko
Reflect "requested" relationship in API and UI Reflect inability of private posts to be reblogged in the UI Disable Webfinger for locked accounts
2016-11-28Adding embedded PuSH serverEugen Rochko
2016-11-20Adding unified streamable notificationsEugen Rochko
2016-11-16Localizations for most server-side stringsEugen Rochko
2016-11-13Fix #142 - Escape ILIKE special characters from Account.find_remoteEugen Rochko