text+="#{merge_request.absorbing_organisation.name} users will have access to all #{type} logs owned or managed by the merging organisations after the merge.<br><br>"
text+="#{merge_request.absorbing_organisation.name} users will have access to all #{type} logs owned or #{managed_or_reported} by the #{merging_organisations} after the merge.<br><br>"
text+="#{type.capitalize} logs that are owned or managed by the merging organisations and have a tenancy start date after the merge date will have their owning or managing organisation changed to #{merge_request.absorbing_organisation.name}.<br><br>"
text+="#{type.capitalize} logs that are owned or #{managed_or_reported} by the #{merging_organisations} and have a #{startdate} after the merge date will have their owning or managing organisation changed to #{merge_request.absorbing_organisation.name}.<br><br>"
text+="Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.<br><br>"
text+="Some logs are owned and #{managed_or_reported} by different organisations in this merge. They appear in the list for both the owning and the managing organisation.<br><br>"
expect(outcome_text).not_toinclude("Org 1 users will have access to all lettings logs owned or managed by the merging organisations after the merge.")
expect(outcome_text).not_toinclude("Org 1 users will have access to all lettings logs owned or managed by the merging organisation after the merge.")
expect(outcome_text).not_toinclude("Lettings logs that are owned or managed by the merging organisations and have a tenancy start date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).not_toinclude("Lettings logs that are owned or managed by the merging organisation and have a tenancy start date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).not_toinclude("Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_toinclude("Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).toinclude("Org 1 and Org 2 have no lettings logs.")
expect(outcome_text).toinclude("Org 1 and Org 2 have no lettings logs.")
end
end
@ -184,9 +184,9 @@ RSpec.describe MergeRequestsHelper do
it"returns the correct merging_organisations_sales_logs_outcomes_text text"do
it"returns the correct merging_organisations_sales_logs_outcomes_text text"do
expect(outcome_text).not_toinclude("Org 1 users will have access to all sales logs owned or managed by the merging organisations after the merge.")
expect(outcome_text).not_toinclude("Org 1 users will have access to all sales logs owned or reported by the merging organisation after the merge.")
expect(outcome_text).not_toinclude("Sales logs that are owned or managed by the merging organisations and have a tenancy start date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).not_toinclude("Sales logs that are owned or reported by the merging organisation and have a sale completion date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).not_toinclude("Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_toinclude("Some logs are owned and reported by different organisation in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).toinclude("Org 1 and Org 2 have no sales logs.")
expect(outcome_text).toinclude("Org 1 and Org 2 have no sales logs.")
end
end
@ -207,8 +207,8 @@ RSpec.describe MergeRequestsHelper do
it"returns the correct merging_organisations_lettings_logs_outcomes_text text"do
it"returns the correct merging_organisations_lettings_logs_outcomes_text text"do
expect(outcome_text).toinclude("Org 1 users will have access to all lettings logs owned or managed by the merging organisations after the merge.")
expect(outcome_text).toinclude("Org 1 users will have access to all lettings logs owned or managed by the merging organisation after the merge.")
expect(outcome_text).toinclude("Lettings logs that are owned or managed by the merging organisations and have a tenancy start date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).toinclude("Lettings logs that are owned or managed by the merging organisation and have a tenancy start date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).not_toinclude("Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_toinclude("Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_toinclude("Org 2 has no lettings logs.")
expect(outcome_text).not_toinclude("Org 2 has no lettings logs.")
expect(outcome_text).toinclude("View all 2 Org 2 lettings logs (opens in a new tab)")
expect(outcome_text).toinclude("View all 2 Org 2 lettings logs (opens in a new tab)")
@ -220,9 +220,9 @@ RSpec.describe MergeRequestsHelper do
it"returns the correct merging_organisations_sales_logs_outcomes_text text"do
it"returns the correct merging_organisations_sales_logs_outcomes_text text"do
expect(outcome_text).toinclude("Org 1 users will have access to all sales logs owned or managed by the merging organisations after the merge.")
expect(outcome_text).toinclude("Org 1 users will have access to all sales logs owned or reported by the merging organisation after the merge.")
expect(outcome_text).toinclude("Sales logs that are owned or managed by the merging organisations and have a tenancy start date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).toinclude("Sales logs that are owned or reported by the merging organisation and have a sale completion date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).not_toinclude("Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_toinclude("Some logs are owned and reported by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_toinclude("Org 2 has no sales logs.")
expect(outcome_text).not_toinclude("Org 2 has no sales logs.")
expect(outcome_text).toinclude("View all 2 Org 2 sales logs (opens in a new tab)")
expect(outcome_text).toinclude("View all 2 Org 2 sales logs (opens in a new tab)")
end
end
@ -255,9 +255,9 @@ RSpec.describe MergeRequestsHelper do
it"returns the correct merging_organisations_sales_logs_outcomes_text text"do
it"returns the correct merging_organisations_sales_logs_outcomes_text text"do
expect(outcome_text).toinclude("Org 1 users will have access to all sales logs owned or managed by the merging organisations after the merge.")
expect(outcome_text).toinclude("Org 1 users will have access to all sales logs owned or reported by the merging organisations after the merge.")
expect(outcome_text).toinclude("Sales logs that are owned or managed by the merging organisations and have a tenancy start date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).toinclude("Sales logs that are owned or reported by the merging organisations and have a sale completion date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).toinclude("Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).toinclude("Some logs are owned and reported by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_toinclude("Org 2 has no sales logs.")
expect(outcome_text).not_toinclude("Org 2 has no sales logs.")
expect(outcome_text).toinclude("View all 3 Org 2 sales logs (opens in a new tab)")
expect(outcome_text).toinclude("View all 3 Org 2 sales logs (opens in a new tab)")
expect(outcome_text).toinclude("View 1 Org 3 sales log (opens in a new tab)")
expect(outcome_text).toinclude("View 1 Org 3 sales log (opens in a new tab)")