|
|
|
@ -230,7 +230,7 @@ RSpec.describe OrganisationsController, type: :request do
|
|
|
|
|
|
|
|
|
|
it "displays a link to merge organisations" do |
|
|
|
|
expect(page).to have_content("Is your organisation merging with another?") |
|
|
|
|
expect(page).to have_link("Let us know using this form", href: "/organisations/#{organisation.id}/merge") |
|
|
|
|
expect(page).to have_link("Let us know using this form", href: "/organisations/#{organisation.id}/merge/start") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
@ -444,7 +444,7 @@ RSpec.describe OrganisationsController, type: :request do
|
|
|
|
|
describe "#merge" do |
|
|
|
|
context "with an organisation that the user belongs to" do |
|
|
|
|
before do |
|
|
|
|
get "/organisations/#{organisation.id}/merge", headers:, params: {} |
|
|
|
|
get "/organisations/#{organisation.id}/merge/start", headers:, params: {} |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "shows the correct content" do |
|
|
|
@ -455,14 +455,14 @@ RSpec.describe OrganisationsController, type: :request do
|
|
|
|
|
expect(page).to have_link("Back", href: "/organisations/#{organisation.id}") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "has a correct start no button" do |
|
|
|
|
expect(page).to have_link("Start now", href: "#") |
|
|
|
|
it "has a correct start now button" do |
|
|
|
|
expect(page).to have_link("Start now", href: "/organisations/#{organisation.id}/merge/organisations") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "with organisation that are not in scope for the user, i.e. that they do not belong to" do |
|
|
|
|
before do |
|
|
|
|
get "/organisations/#{unauthorised_organisation.id}/merge", headers:, params: {} |
|
|
|
|
get "/organisations/#{unauthorised_organisation.id}/merge/start", headers:, params: {} |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "returns not found 404 from org details route" do |
|
|
|
|