Merge tag 'v2.8.0' into instance_only_statuses

This commit is contained in:
Renato "Lond" Cerqueira
2019-04-13 23:47:24 +02:00
689 changed files with 25483 additions and 9047 deletions

View File

@ -558,6 +558,11 @@ RSpec.describe Account, type: :model do
expect(account).to model_have_error_on_field(:username)
end
it 'squishes the username before validation' do
account = Fabricate(:account, domain: nil, username: " \u3000bob \t \u00a0 \n ")
expect(account.username).to eq 'bob'
end
context 'when is local' do
it 'is invalid if the username is not unique in case-insensitive comparison among local accounts' do
account_1 = Fabricate(:account, username: 'the_doctor')

View File

@ -237,9 +237,9 @@ describe AccountInteractions do
end
describe '#block_domain!' do
let(:domain_block) { Fabricate(:domain_block) }
let(:domain) { 'example.com' }
subject { account.block_domain!(domain_block) }
subject { account.block_domain!(domain) }
it 'creates and returns AccountDomainBlock' do
expect do

View File

@ -21,20 +21,22 @@ describe Export do
target_accounts.each(&account.method(:mute!))
export = Export.new(account).to_muted_accounts_csv
results = export.strip.split
results = export.strip.split("\n")
expect(results.size).to eq 2
expect(results.first).to eq 'one@local.host'
expect(results.size).to eq 3
expect(results.first).to eq 'Account address,Hide notifications'
expect(results.second).to eq 'one@local.host,true'
end
it 'returns a csv of the following accounts' do
target_accounts.each(&account.method(:follow!))
export = Export.new(account).to_following_accounts_csv
results = export.strip.split
results = export.strip.split("\n")
expect(results.size).to eq 2
expect(results.first).to eq 'one@local.host'
expect(results.size).to eq 3
expect(results.first).to eq 'Account address,Show boosts'
expect(results.second).to eq 'one@local.host,true'
end
end

View File

@ -0,0 +1,4 @@
require 'rails_helper'
RSpec.describe FeaturedTag, type: :model do
end

5
spec/models/poll_spec.rb Normal file
View File

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe Poll, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe PollVote, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -0,0 +1,4 @@
require 'rails_helper'
RSpec.describe UserInviteRequest, type: :model do
end