Prepare the way for banning a bunch of usernames (#32856)
This commit is contained in:
		
							parent
							
								
									f5f6273d2b
								
							
						
					
					
						commit
						884bbf7ae2
					
				| @ -343,16 +343,16 @@ RSpec.describe FeedManager do | |||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   describe '#push_to_list' do |   describe '#push_to_list' do | ||||||
|     let(:owner) { Fabricate(:account, username: 'owner') } |     let(:list_owner) { Fabricate(:account, username: 'list_owner') } | ||||||
|     let(:alice) { Fabricate(:account, username: 'alice') } |     let(:alice) { Fabricate(:account, username: 'alice') } | ||||||
|     let(:bob)   { Fabricate(:account, username: 'bob') } |     let(:bob)   { Fabricate(:account, username: 'bob') } | ||||||
|     let(:eve)   { Fabricate(:account, username: 'eve') } |     let(:eve)   { Fabricate(:account, username: 'eve') } | ||||||
|     let(:list)  { Fabricate(:list, account: owner) } |     let(:list)  { Fabricate(:list, account: list_owner) } | ||||||
| 
 | 
 | ||||||
|     before do |     before do | ||||||
|       owner.follow!(alice) |       list_owner.follow!(alice) | ||||||
|       owner.follow!(bob) |       list_owner.follow!(bob) | ||||||
|       owner.follow!(eve) |       list_owner.follow!(eve) | ||||||
| 
 | 
 | ||||||
|       list.accounts << alice |       list.accounts << alice | ||||||
|       list.accounts << bob |       list.accounts << bob | ||||||
| @ -377,7 +377,7 @@ RSpec.describe FeedManager do | |||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|       it 'pushes statuses that are replies to list owner' do |       it 'pushes statuses that are replies to list owner' do | ||||||
|         status = Fabricate(:status, text: 'Hello world', account: owner) |         status = Fabricate(:status, text: 'Hello world', account: list_owner) | ||||||
|         reply  = Fabricate(:status, text: 'Nay', thread: status, account: bob) |         reply  = Fabricate(:status, text: 'Nay', thread: status, account: bob) | ||||||
|         expect(subject.push_to_list(list, reply)).to be true |         expect(subject.push_to_list(list, reply)).to be true | ||||||
|       end |       end | ||||||
| @ -400,7 +400,7 @@ RSpec.describe FeedManager do | |||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|       it 'pushes statuses that are replies to list owner' do |       it 'pushes statuses that are replies to list owner' do | ||||||
|         status = Fabricate(:status, text: 'Hello world', account: owner) |         status = Fabricate(:status, text: 'Hello world', account: list_owner) | ||||||
|         reply  = Fabricate(:status, text: 'Nay', thread: status, account: bob) |         reply  = Fabricate(:status, text: 'Nay', thread: status, account: bob) | ||||||
|         expect(subject.push_to_list(list, reply)).to be true |         expect(subject.push_to_list(list, reply)).to be true | ||||||
|       end |       end | ||||||
| @ -429,7 +429,7 @@ RSpec.describe FeedManager do | |||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|       it 'pushes statuses that are replies to list owner' do |       it 'pushes statuses that are replies to list owner' do | ||||||
|         status = Fabricate(:status, text: 'Hello world', account: owner) |         status = Fabricate(:status, text: 'Hello world', account: list_owner) | ||||||
|         reply  = Fabricate(:status, text: 'Nay', thread: status, account: bob) |         reply  = Fabricate(:status, text: 'Nay', thread: status, account: bob) | ||||||
|         expect(subject.push_to_list(list, reply)).to be true |         expect(subject.push_to_list(list, reply)).to be true | ||||||
|       end |       end | ||||||
|  | |||||||
| @ -3,10 +3,10 @@ | |||||||
| require 'rails_helper' | require 'rails_helper' | ||||||
| 
 | 
 | ||||||
| RSpec.describe Account::Interactions do | RSpec.describe Account::Interactions do | ||||||
|   let(:account)            { Fabricate(:account, username: 'account') } |   let(:account)            { Fabricate(:account) } | ||||||
|   let(:account_id)         { account.id } |   let(:account_id)         { account.id } | ||||||
|   let(:account_ids)        { [account_id] } |   let(:account_ids)        { [account_id] } | ||||||
|   let(:target_account)     { Fabricate(:account, username: 'target') } |   let(:target_account)     { Fabricate(:account) } | ||||||
|   let(:target_account_id)  { target_account.id } |   let(:target_account_id)  { target_account.id } | ||||||
|   let(:target_account_ids) { [target_account_id] } |   let(:target_account_ids) { [target_account_id] } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user