Allow more flexible host/port treatment with LOCAL_DOMAIN values in tests (#35040)
This commit is contained in:
		
					parent
					
						
							
								b2506478ba
							
						
					
				
			
			
				commit
				
					
						ca3cc36549
					
				
			
		
					 9 changed files with 32 additions and 12 deletions
				
			
		|  | @ -61,7 +61,16 @@ RSpec.describe RemoteFollow do | |||
|     let(:account) { Fabricate(:account, username: 'alice') } | ||||
| 
 | ||||
|     it 'returns subscribe address' do | ||||
|       expect(subject).to eq "https://quitter.no/main/ostatussub?profile=https%3A%2F%2F#{Rails.configuration.x.local_domain}%2Fusers%2Falice" | ||||
|       expect(subject).to eq(expected_subscribe_url) | ||||
|     end | ||||
| 
 | ||||
|     def expected_subscribe_url | ||||
|       Addressable::URI.new( | ||||
|         host: 'quitter.no', | ||||
|         path: '/main/ostatussub', | ||||
|         query_values: { profile: "https://#{Rails.configuration.x.local_domain}/users/alice" }, | ||||
|         scheme: 'https' | ||||
|       ).to_s | ||||
|     end | ||||
|   end | ||||
| end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue