context"and next year resources were manually released"do
beforedo
CollectionResource.create!(year:2025,resource_type:"paper_form",display_name:"lettings log for tenants (2025 to 2026)",download_filename:"file.pdf",mandatory:true,released_to_user:true)
CollectionResource.create!(year:2025,resource_type:"bulk_upload_template",display_name:"bulk upload template (2025 to 2026)",download_filename:"file.xlsx",mandatory:true,released_to_user:true)
CollectionResource.create!(year:2025,resource_type:"bulk_upload_specification",display_name:"sales log for tenants (2025 to 2026)",download_filename:"file.xlsx",mandatory:true,released_to_user:true)
expect(text_year_range_format(2023)).toeq("2023 to 2024")
end
end
describe"#document_list_component_items"do
let(:resources)do
[
build(:collection_resource,year:2023,resource_type:"paper_form",display_name:"lettings log for tenants (2023 to 2024)",download_filename:"2023_24_lettings_paper_form.pdf"),
build(:collection_resource,year:2023,resource_type:"bulk_upload_template",display_name:"bulk upload template (2023 to 2024)",download_filename:"2023_24_lettings_bulk_upload_template.xlsx"),
build(:collection_resource,year:2023,resource_type:"paper_form",display_name:"lettings log for tenants (2023 to 2024)",download_filename:"2023_24_lettings_paper_form.pdf"),
build(:collection_resource,year:2023,resource_type:"bulk_upload_template",display_name:"bulk upload template (2023 to 2024)",download_filename:"2023_24_lettings_bulk_upload_template.xlsx"),
context"and the resources have been manually released"do
beforedo
CollectionResource.create!(year:2025,resource_type:"paper_form",display_name:"lettings log for tenants (2025 to 2026)",download_filename:"file.pdf",mandatory:true,released_to_user:true)
CollectionResource.create!(year:2025,resource_type:"bulk_upload_template",display_name:"bulk upload template (2025 to 2026)",download_filename:"file.xlsx",mandatory:true,released_to_user:true)
CollectionResource.create!(year:2025,resource_type:"bulk_upload_specification",display_name:"sales log for tenants (2025 to 2026)",download_filename:"file.xlsx",mandatory:true,released_to_user:true)
expect(next_year_banner_text(lettings_resources,sales_resources)).toeq("Once you have uploaded all the required 2025 to 2026 collection resources, you will be able to release them to users.")