Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This test is to check that the contents method returns the memoised @contents when repeatedly called, rather than running line 10 https://github.com/alphagov/government-frontend/blob/6dbefab2ed477a6328f57227494b4561f811f239/app/presenters/content_item/contents_list.rb#L10 The original test checked if the code on line 11 was run, ie the contents_items method. But the content_items method is called in two places in this module, within both the contents method (which this test is testing) but also within the show_contents_items? method.This means changes to the show_contents_items? code unexpectedly breaks this test. This commit reduces the scope of the test so that unexpected test failures no longer occur.
- Loading branch information