From e47c12e473b8ddf490f9ea0b2078e9dbbd0acb1e Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Wed, 1 Dec 2021 19:41:51 +0000 Subject: [PATCH] New user path --- app/views/organisations/users.html.erb | 2 +- app/views/users/new.html.erb | 2 +- spec/features/organisation_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/organisations/users.html.erb b/app/views/organisations/users.html.erb index e18ab39e5..dbf53b484 100644 --- a/app/views/organisations/users.html.erb +++ b/app/views/organisations/users.html.erb @@ -3,7 +3,7 @@ <%= "Users" %> <% end %> -<%= govuk_button_link_to "Invite user", users_invite_organisation_path(@organisation), html: { method: :get } %> +<%= govuk_button_link_to "Invite user", new_user_path, html: { method: :get } %> <%= govuk_table do |table| %> <%= table.head do |head| %> <%= head.row do |row| diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index df1c7b045..4aacdd6a9 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -5,7 +5,7 @@ ) %> <% end %> -<%= form_for(@resource, as: @resource_name, url: account_create_path(), html: { method: :post }) do |f| %> +<%= form_for(@resource, as: :user, html: { method: :post }) do |f| %>
<%= f.govuk_error_summary %> diff --git a/spec/features/organisation_spec.rb b/spec/features/organisation_spec.rb index 416cb4367..afd9ee7ca 100644 --- a/spec/features/organisation_spec.rb +++ b/spec/features/organisation_spec.rb @@ -32,7 +32,7 @@ RSpec.describe "User Features" do visit("/organisations/#{org_id}") click_link("Users") click_link("Invite user") - expect(page).to have_current_path("/organisations/#{org_id}/users/invite") + expect(page).to have_current_path("/users/new") expect(page).to have_content("Invite user to submit CORE data") end end