@ -477,6 +477,10 @@ RSpec.describe LettingsLogsController, type: :request do
let! ( :included_log ) { create ( :lettings_log , :in_progress , bulk_upload : , owning_organisation : organisation ) }
let! ( :included_log ) { create ( :lettings_log , :in_progress , bulk_upload : , owning_organisation : organisation ) }
let! ( :excluded_log ) { create ( :lettings_log , :in_progress , owning_organisation : organisation , tenancycode : " fake_code " ) }
let! ( :excluded_log ) { create ( :lettings_log , :in_progress , owning_organisation : organisation , tenancycode : " fake_code " ) }
before do
create ( :bulk_upload_error , bulk_upload : , col : " A " , row : 1 )
end
it " returns logs only associated with the bulk upload " do
it " returns logs only associated with the bulk upload " do
get " /lettings-logs?bulk_upload_id[]= #{ bulk_upload . id } "
get " /lettings-logs?bulk_upload_id[]= #{ bulk_upload . id } "
@ -484,9 +488,9 @@ RSpec.describe LettingsLogsController, type: :request do
expect ( page ) . not_to have_content ( excluded_log . tenancycode )
expect ( page ) . not_to have_content ( excluded_log . tenancycode )
end
end
it " displays how many logs remaining to fix " do
it " dislays bulk uplaoad header " do
get " /lettings-logs?bulk_upload_id[]= #{ bulk_upload . id } "
get " /lettings-logs?bulk_upload_id[]= #{ bulk_upload . id } "
expect ( page ) . to have_content ( " You need to fix 1 log " )
expect ( page ) . to have_content ( " Fix the errors from this bulk upload " )
end
end
it " displays filter " do
it " displays filter " do
@ -517,7 +521,7 @@ RSpec.describe LettingsLogsController, type: :request do
it " displays card with help info " do
it " displays card with help info " do
get " /lettings-logs?bulk_upload_id[]= #{ bulk_upload . id } "
get " /lettings-logs?bulk_upload_id[]= #{ bulk_upload . id } "
expect ( page ) . to have_content ( " The following logs are from your recent bulk upload " )
expect ( page ) . to have_content ( " You have uploaded 1 log. There are errors in 1 log and 1 error in total. Select the log to fix the errors. " )
end
end
it " displays meta info about the bulk upload " do
it " displays meta info about the bulk upload " do