<% if current_user.id == @bulk_upload.moved_user_id %>
You moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.
<% else %>
Some logs in this upload are assigned to <%= @bulk_upload.moved_user_name %>, who has moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.
expect(response.body).toinclude("This error report is out of date.")
expect(response.body).toinclude("Some logs in this upload are assigned to #{user.name}, who has moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.")
end
end
context"and bulk upload has been cancelled by the current moved user"do
expect(response.body).toinclude("This error report is out of date.")
expect(response.body).toinclude("You moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.")
end
end
end
end
@ -107,5 +129,28 @@ RSpec.describe BulkUploadLettingsResultsController, type: :request do
expect(response).tobe_not_found
end
end
context"and bulk upload has been cancelled by not the current moved user"do
expect(response.body).toinclude("This error report is out of date.")
expect(response.body).toinclude("Some logs in this upload are assigned to #{other_user.name}, who has moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.")
end
end
context"and bulk upload has been cancelled by the current moved user"do
expect(response.body).toinclude("This error report is out of date.")
expect(response.body).toinclude("You moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.")
expect(response.body).toinclude("This error report is out of date.")
expect(response.body).toinclude("Some logs in this upload are assigned to #{user.name}, who has moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.")
end
end
context"and bulk upload has been cancelled by the current moved user"do
expect(response.body).toinclude("This error report is out of date.")
expect(response.body).toinclude("You moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.")
expect(response.body).toinclude("This error report is out of date.")
expect(response.body).toinclude("Some logs in this upload are assigned to #{other_user.name}, who has moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.")
end
end
context"and bulk upload has been cancelled by the current moved user"do
expect(response.body).toinclude("This error report is out of date.")
expect(response.body).toinclude("You moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.")