Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Michael Hartl RoR tutorial chapter 12 exercise #2

For those who have gone through this exercise what are the FILL_IN's in:

test "feed on Home page" do
  get root_path
  @user.feed.paginate(page: 1).each do |micropost|
    assert_match CGI.escapeHTML(FILL_IN), FILL_IN
  end
end

Thanks

like image 417
fox Avatar asked Dec 06 '25 02:12

fox


1 Answers

You should match micropost content with body response, it looks like this:

test "feed on Home page" do
  get root_path
  @user.feed.paginate(page: 1).each do |micropost|
    assert_match CGI.escapeHTML(micropost.content), response.body
  end
end
like image 170
André Avatar answered Dec 09 '25 17:12

André



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!