From 94c2ba28fc3a680cf30f7ed84927e36d9445ca58 Mon Sep 17 00:00:00 2001 From: Jack S Date: Thu, 8 Jun 2023 09:59:56 +0100 Subject: [PATCH] fix log component --- app/components/create_log_actions_component.html.erb | 2 +- spec/requests/organisations_controller_spec.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/components/create_log_actions_component.html.erb b/app/components/create_log_actions_component.html.erb index c92fc03b2..1b6bd8aca 100644 --- a/app/components/create_log_actions_component.html.erb +++ b/app/components/create_log_actions_component.html.erb @@ -4,7 +4,7 @@ <%= govuk_button_to create_button_copy, create_button_href, class: "govuk-!-margin-right-6" %> <% end %> <% if upload_button_href.present? %> - <%= govuk_button_to upload_button_copy, upload_button_href, secondary: true %> + <%= govuk_button_link_to upload_button_copy, upload_button_href, secondary: true %> <% end %> <% end %> diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index e8580d219..0bbe64829 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -1469,6 +1469,8 @@ RSpec.describe OrganisationsController, type: :request do end describe "POST #data_sharing_agreement" do + let(:organisation) { create(:organisation, :without_dsa) } + context "when not signed in" do it "redirects to sign in" do post "/organisations/#{organisation.id}/data-sharing-agreement", headers: headers @@ -1508,7 +1510,7 @@ RSpec.describe OrganisationsController, type: :request do end context "when user is dpo" do - let(:user) { create(:user, is_dpo: true) } + let(:user) { create(:user, is_dpo: true, organisation:) } it "returns redirects to details page" do post "/organisations/#{organisation.id}/data-sharing-agreement", headers: headers