Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `.prettierignore`:
  Upstream added a line at the end of the file, while glitch-soc had its own
  extra lines.
  Took upstream's change.
- `CONTRIBUTING.md`:
  We have our custom CONTRIBUTING.md quoting upstream. Upstream made changes.
  Ported upstream changes.
- `app/controllers/application_controller.rb`:
  Upstream made code style changes in a method that is entirely replaced
  in glitch-soc.
  Ignored the change.
- `app/models/account.rb`:
  Code style changes textually close to glitch-soc-specific changes.
  Ported upstream changes.
- `lib/sanitize_ext/sanitize_config.rb`:
  Upstream code style changes.
  Ignored them.
This commit is contained in:
Claire
2023-02-25 14:00:40 +01:00
946 changed files with 4147 additions and 3072 deletions

View File

@@ -1,12 +1,14 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Status, type: :model do
subject { Fabricate(:status, account: alice) }
let(:alice) { Fabricate(:account, username: 'alice') }
let(:bob) { Fabricate(:account, username: 'bob') }
let(:other) { Fabricate(:status, account: bob, text: 'Skulls for the skull god! The enemy\'s gates are sideways!') }
subject { Fabricate(:status, account: alice) }
describe '#local?' do
it 'returns true when no remote URI is set' do
expect(subject.local?).to be true
@@ -241,11 +243,11 @@ RSpec.describe Status, type: :model do
end
describe '.mutes_map' do
subject { Status.mutes_map([status.conversation.id], account) }
let(:status) { Fabricate(:status) }
let(:account) { Fabricate(:account) }
subject { Status.mutes_map([status.conversation.id], account) }
it 'returns a hash' do
expect(subject).to be_a Hash
end
@@ -257,11 +259,11 @@ RSpec.describe Status, type: :model do
end
describe '.favourites_map' do
subject { Status.favourites_map([status], account) }
let(:status) { Fabricate(:status) }
let(:account) { Fabricate(:account) }
subject { Status.favourites_map([status], account) }
it 'returns a hash' do
expect(subject).to be_a Hash
end
@@ -273,11 +275,11 @@ RSpec.describe Status, type: :model do
end
describe '.reblogs_map' do
subject { Status.reblogs_map([status], account) }
let(:status) { Fabricate(:status) }
let(:account) { Fabricate(:account) }
subject { Status.reblogs_map([status], account) }
it 'returns a hash' do
expect(subject).to be_a Hash
end