diff options
Diffstat (limited to 'spec/views/stream_entries/show.html.haml_spec.rb')
-rw-r--r-- | spec/views/stream_entries/show.html.haml_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/views/stream_entries/show.html.haml_spec.rb b/spec/views/stream_entries/show.html.haml_spec.rb new file mode 100644 index 000000000..18814e785 --- /dev/null +++ b/spec/views/stream_entries/show.html.haml_spec.rb @@ -0,0 +1,22 @@ +require 'rails_helper' + +describe "accounts/show.html.haml" do + + it "has an h-feed with correct number of h-entry objects in it" do + alice = Fabricate(:account, username: 'alice', display_name: 'Alice') + status = Fabricate(:status, account: alice, text: 'Hello World') + status2 = Fabricate(:status, account: alice, text: 'Hello World Again') + status3 = Fabricate(:status, account: alice, text: 'Are You Still There World?') + + assign(:account, alice) + assign(:statuses, alice.statuses) + + render(:template => 'accounts/show.html.haml') + + expect(Nokogiri::HTML(rendered).search('.h-feed .h-entry').size).to eq 3 + + end + +end + + |