2017-04-14 20:37:00 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								require 'rails_helper'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-15 21:40:33 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								describe 'accounts/show.html.haml' do
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-14 20:37:00 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  before do
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-15 21:40:33 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    allow(view).to receive(:show_landing_strip?).and_return(true)
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-14 20:37:00 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-15 21:40:33 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  it 'has an h-feed with correct number of h-entry objects in it' do
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-14 20:37:00 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    alice   =  Fabricate(:account, username: 'alice', display_name: 'Alice')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    status  =  Fabricate(:status, account: alice, text: 'Hello World')
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-15 21:40:33 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    status2 =  Fabricate(:status, account: alice, text: 'Hello World Again')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    status3 =  Fabricate(:status, account: alice, text: 'Are You Still There World?')
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-14 20:37:00 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    assign(:account, alice)
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-15 21:40:33 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    assign(:statuses, alice.statuses)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    assign(:stream_entry, status.stream_entry)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    assign(:type, status.stream_entry.activity_type.downcase)
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-14 20:37:00 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-15 21:40:33 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    render
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-14 20:37:00 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-15 21:40:33 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    expect(Nokogiri::HTML(rendered).search('.h-feed .h-entry').size).to eq 3
							 | 
						
					
						
							
								
									
										
										
										
											2017-04-14 20:37:00 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								end
							 |