Browse Source

PR review changes

pull/1535/head
Kat 3 years ago
parent
commit
694af72915
  1. 1
      app/controllers/merge_requests_controller.rb
  2. 4
      app/views/merge_requests/organisations.html.erb
  3. 2
      spec/requests/merge_requests_controller_spec.rb

1
app/controllers/merge_requests_controller.rb

@ -9,7 +9,6 @@ class MergeRequestsController < ApplicationController
end end
def organisations def organisations
@merge_request = MergeRequest.find(params[:id])
@answer_options = organisations_answer_options @answer_options = organisations_answer_options
end end

4
app/views/merge_requests/organisations.html.erb

@ -30,7 +30,7 @@
}) %> }) %>
<% end %> <% end %>
<% end %> <% end %>
<% @merge_request.merging_organisations&.each do |merging_organisation| %> <% @merge_request.merging_organisations.each do |merging_organisation| %>
<%= table.body do |body| %> <%= table.body do |body| %>
<%= body.row do |row| %> <%= body.row do |row| %>
<% row.cell(text: merging_organisation.name) %> <% row.cell(text: merging_organisation.name) %>
@ -46,7 +46,7 @@
<% end %> <% end %>
<% end %> <% end %>
<%= form_with model: @merge_request, url: merge_request_path(id: @merge_request.id), method: :patch do |f| %> <%= form_with model: @merge_request, url: merge_request_path(id: @merge_request.id), method: :patch do |f| %>
<%= govuk_details(summary_text: "Can't find the managing agent you're looking for?") do %> <%= govuk_details(summary_text: "Can’t find the managing agent you’re looking for?") do %>
<%= f.govuk_text_area :other_merging_organisations, label: { text: "Other organisations" }, hint: { text: "List other organisations that are part of the merge but not registered on CORE." }, rows: 9 %> <%= f.govuk_text_area :other_merging_organisations, label: { text: "Other organisations" }, hint: { text: "List other organisations that are part of the merge but not registered on CORE." }, rows: 9 %>
<% end %> <% end %>
<%= f.govuk_submit "Continue" %> <%= f.govuk_submit "Continue" %>

2
spec/requests/merge_requests_controller_spec.rb

@ -2,7 +2,7 @@ require "rails_helper"
RSpec.describe MergeRequestsController, type: :request do RSpec.describe MergeRequestsController, type: :request do
let(:organisation) { user.organisation } let(:organisation) { user.organisation }
let!(:other_organisation) { FactoryBot.create(:organisation, name: "Other Test Org") } let(:other_organisation) { FactoryBot.create(:organisation, name: "Other Test Org") }
let(:headers) { { "Accept" => "text/html" } } let(:headers) { { "Accept" => "text/html" } }
let(:page) { Capybara::Node::Simple.new(response.body) } let(:page) { Capybara::Node::Simple.new(response.body) }
let(:user) { FactoryBot.create(:user, :data_coordinator) } let(:user) { FactoryBot.create(:user, :data_coordinator) }

Loading…
Cancel
Save