Skip to content
Snippets Groups Projects
  1. Apr 28, 2017
    • Joël Quenneville's avatar
      Add tests to the Feed model (#2594) · 27301312
      Joël Quenneville authored
      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).
      27301312
    • Patrick Figel's avatar
      Set correct attachment type for rejected media (#2599) · 8ac7fca5
      Patrick Figel authored
      In #2110, a new attachment type "unknown" was introduced for
      attachments that were rejected due to a domain being blocked using
      reject_media. However, the "type" field was never set to "unknown"
      because a default value of "0" (image) is set for that column,
      causing the `type.blank?` expression to always equal false.
      
      This version uses type_changed? instead, causing the type to be set
      to "unknown" unless a type has been explicitly set. This introduces
      a small change in behaviour causing the type to be set to unknown
      before paperclip calls `before_post_process`. Presumably this
      behaviour is more appropriate than the current one because the
      attachment type has not been determined by that point.
      
      Included are new tests for `ProcessFeedService` and
      `UpdateRemoteProfileService` which now check that remote media is
      downloaded for non-blocked domains and is rejected for others.
      8ac7fca5
    • Matt Jankowski's avatar
      a823509b
    • Matt Jankowski's avatar
    • Yamagishi Kazutoshi's avatar
      71e73e36
    • Matt Jankowski's avatar
      More controller specs (#2561) · 9566893c
      Matt Jankowski authored
      * Add render_views in more places
      
      * Delegate methods from account to user with allow nil true, so that admin accounts show view renders when missing a user
      
      * Use actual account instances in authorize follow controller spec
      9566893c
    • Matt Jankowski's avatar
      429480bb
    • Matt Jankowski's avatar
      More status specs (#2564) · effb08ed
      Matt Jankowski authored
      * 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
      effb08ed
  2. Apr 27, 2017
  3. Apr 26, 2017
  4. Apr 25, 2017
  5. Apr 24, 2017
  6. Apr 23, 2017
    • Eugen's avatar
      Followers-only post federation (#2111) · 50151496
      Eugen authored
      * Make private toots get PuSHed to subscription URLs that belong to domains where you have approved followers
      
      * Authorized followers controller, stub for bulk action
      
      * Soft block in the background
      
      * Add simple test for new controller
      
      * Rename Settings::FollowersController to Settings::FollowerDomainsController, paginate results,
      rename "private" post setting to "followers-only", fix pagination style, improve post privacy
      preferences style, improve warning style
      
      * Extract compose form warnings into own container, show warning when posting to followers-only with unlocked account
      50151496
    • Matt Jankowski's avatar
    • Matt Jankowski's avatar
      Ensure i18n matches options (#2358) · 55e1e12b
      Matt Jankowski authored
      * Add failing spec showing that human_locales does not match what i18n knows about
      
      * Add missing `ar` key for arabic to human locales
      
      * Remove duplicate `id` key from available locales
      
      * Sort keys in human locales list
      
      * Add spec for human_locale helper
      55e1e12b
    • Joël Quenneville's avatar
      Test embedded_view related code in a helper (#2282) · 1cf9e14a
      Joël Quenneville authored
      The two methods `StreamEntriesHelper#stream_link_target` and
      `StreamEntriesHelper#acct` are based on checking whether we are running
      in an embedded view.
      
      This adds some test helper code to make the testing easier. We extracted
      some "magic strings" to constants to lower the coupling in the specs.
      1cf9e14a
    • Joël Quenneville's avatar
      Add test coverage to CSS class generation (#2285) · 0c2fe22b
      Joël Quenneville authored
      The code that generates CSS is based on a lot of boolean conditions.
      The possible combinations of these grows exponentially as we add more
      conditions.
      
      Since most of the code is conditional on a single boolean, we tested the
      following:
      
      1. All `false`
      2. All `true`
      3. Each individual flag set to `true`
      
      The methods tested are:
      
      * `StreamEntriesHelper#style_classes`
      * `StreamEntriesHelper#microformats_classes`
      * `StreamEntriesHelper#microformats_h_class`
      0c2fe22b
    • Evan Minto's avatar
      ActivityPub: Add basic, read-only support for Outboxes, Notes, and... · 66fd8e78
      Evan Minto authored
      ActivityPub: Add basic, read-only support for Outboxes, Notes, and Create/Announce Activities (#2197)
      
      * Clean up collapsible components
      
      * Expose user Outboxes and AS2 representations of statuses
      
      * Save work thus far.
      
      * Fix bad merge.
      
      * Save my work
      
      * Clean up pagination.
      
      * First test working.
      
      * Add tests.
      
      * Add Forbidden error template.
      
      * Revert yarn.lock changes.
      
      * Fix code style deviations and use localized instead of hardcoded English text.
      66fd8e78
    • Ash Furrow's avatar
      Admin UI for confirming users (#2245) · 723f25a9
      Ash Furrow authored
      * Shows confirmed status in list.
      
      * Adds ability to confirm users in admin UI.
      
      * Added new english translations.
      
      * Addresses feedback from #2245.
      
      * More feedback.
      723f25a9
  7. Apr 22, 2017
    • Wesley Ellis's avatar
      Add og:url tags (#2298) · a1174a6d
      Wesley Ellis authored
      * add og:url to stream_item view
      
      * add og:url and text to about/show
      
      * add og:url to profile, followers and follows pages
      a1174a6d
    • Matt Jankowski's avatar
      [WIP] Html lang on statuses (#2297) · 629d35e6
      Matt Jankowski authored
      * Add html lang attributes around statuses
      
      * Remove urls from language detection
      629d35e6
    • Matt Jankowski's avatar
      2FA controller cleanup (#2296) · 67dea31b
      Matt Jankowski authored
      * Add spec coverage for settings/two_factor_auth area
      
      * extract setup method for qr code
      
      * Move otp required check to before action
      
      * Merge method only used once
      
      * Remove duplicate view
      
      * Consolidate creation of @codes for backup
      
      * Move settings/2fq#recovery_codes to settings/recovery_codes#create
      
      * Rename settings/two_factor_auth#disable to #destroy
      
      * Add coverage for the otp required path on 2fa#show
      
      * Clean up the recovery codes list styles
      
      * Move settings/two_factor_auth to settings/two_factor_authentication
      
      * Reorganize the settings two factor auth area
      
      Updated to use a flow like:
      
      - settings/two_factor_authentication goes to a #show view which has a button
        either enable or disable 2fa on the account
      - the disable button turns off the otp requirement for the user
      - the enable button cycles the user secret and redirects to a confirmation page
      - the confirmation page is a #new view which shows the QR code for user
      - that page posts to #create which verifies the code, and creates the recovery
        codes
      - that create action shares a view with a recovery codes controller which can be
        used separately to reset codes if needed
      67dea31b
  8. Apr 21, 2017
  9. Apr 20, 2017
    • Matt Jankowski's avatar
      Admin settings controller refactor, add specs, cleanup (#2225) · 1ada494b
      Matt Jankowski authored
      * Add render_views for admin/settings spec
      
      * Add coverage for admin/settings#update
      
      * Add coverage for admin/settings typecasting open_registrations setting
      
      * Simplify how admin/settings finds the value for updating
      
      * Rely on activerecord to not update a value that hasnt changed
      
      * Add coverage for non-existent setting
      
      * Use a constant for boolean settings
      1ada494b
Loading