You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
654 B

  1. require 'rails_helper'
  2. describe "accounts/show.html.haml" do
  3. it "has an h-feed with correct number of h-entry objects in it" do
  4. alice = Fabricate(:account, username: 'alice', display_name: 'Alice')
  5. status = Fabricate(:status, account: alice, text: 'Hello World')
  6. status2 = Fabricate(:status, account: alice, text: 'Hello World Again')
  7. status3 = Fabricate(:status, account: alice, text: 'Are You Still There World?')
  8. assign(:account, alice)
  9. assign(:statuses, alice.statuses)
  10. render(:template => 'accounts/show.html.haml')
  11. expect(Nokogiri::HTML(rendered).search('.h-feed .h-entry').size).to eq 3
  12. end
  13. end