fox
fox

Reputation: 31

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

Upvotes: 3

Views: 714

Answers (1)

André
André

Reputation: 71

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

Upvotes: 7

Related Questions