<p>Our <code>UsersController</code> is huge, as is the test file, and both are hard to navigate when working on the code. This PR splits out the methods relating to the Friendship model into their own controller, which I think is a better place for them anyway.</p>
<p>Further work would involve refactoring the Friendship controller into new/create etc actions</p>
<p>This PR contains translation key renames, but hopefully <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/translatewiki/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/translatewiki">@translatewiki</a> will <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2494#issuecomment-570925892" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2494/hovercard">pick them up automatically</a> since the texts are unchanged.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/2642'>https://github.com/openstreetmap/openstreetmap-website/pull/2642</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Move friendship related tests to separate file</li>
  <li>Move make_friend and remove_friend to friendships controller</li>
  <li>Rename friend to friendship in notifier</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-10626e4abd816566b39f76b405c3be77">app/abilities/ability.rb</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-2fb74888f359177b1606af1a70ed92ed">app/controllers/friendships_controller.rb</a>
    (62)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-4e05ad0d64e6100656b63ad1e78f32c5">app/controllers/users_controller.rb</a>
    (53)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-3494c65a45cca0cc7a18b653f206bc51">app/mailers/notifier.rb</a>
    (21)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-7adf047d6024ca3ebd6f3fcb2245ec8d">app/views/friendships/make_friend.html.erb</a>
    (0)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-43a3d2432c5f77bc2364d552ce75abca">app/views/friendships/remove_friend.html.erb</a>
    (0)
  </li>
  <li>
    <strong>D</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-2c0ad7f60fbd5e8a4ff7ce2b82728171">app/views/notifier/friend_notification.text.erb</a>
    (7)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-6b8c702d3ff6a4cd92e2cb8da03d0aa7">app/views/notifier/friendship_notification.html.erb</a>
    (4)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-3dcc882a941a39ca76eafbe9104c02db">app/views/notifier/friendship_notification.text.erb</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-37c9b835927e3c363588f172de9bb6fa">config/locales/en.yml</a>
    (25)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-21497849d8f00507c9c8dcaf6288b136">config/routes.rb</a>
    (6)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-00c0c21c23e23f0223a5b5823b2f44dd">test/controllers/friendships_controller_test.rb</a>
    (198)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642/files#diff-bb4f56cd35d59167613aebdb789fbc7a">test/controllers/users_controller_test.rb</a>
    (191)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2642.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2642.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2642.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2642.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2642">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLN7JCS3JHNRTQT37NTRU2AFVANCNFSM4NR3RC4A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLNTHW2RSVWD7DMCXYDRU2AFVA5CNFSM4NR3RC4KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JMPWHTA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2642",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2642",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>