Browse Source

Turning off turbo changes our html

pull/134/head
baarkerlounger 4 years ago committed by Paul Robert Lloyd
parent
commit
ad63618e7d
  1. 2
      app/views/organisations/users.html.erb
  2. 5
      spec/requests/organisations_controller_spec.rb

2
app/views/organisations/users.html.erb

@ -3,7 +3,7 @@
<%= "Users" %>
<% end %>
<%= govuk_button_link_to "Invite user", new_user_registration_path, html: { "data-turbo" => "false" , method: :get } %>
<%= govuk_button_link_to "Invite user", new_user_registration_path, html: { "data-turbo" => "false", method: :get } %>
<%= govuk_table do |table| %>
<%= table.head do |head| %>
<%= head.row do |row|

5
spec/requests/organisations_controller_spec.rb

@ -4,6 +4,7 @@ RSpec.describe OrganisationsController, type: :request do
let(:user) { FactoryBot.create(:user) }
let(:organisation) { user.organisation }
let(:headers) { { "Accept" => "text/html" } }
let(:page) { Capybara::Node::Simple.new(response.body) }
context "details tab" do
before do
@ -40,9 +41,7 @@ RSpec.describe OrganisationsController, type: :request do
end
it "shows a new user button" do
expected_html = "<a class=\"govuk-button\""
expect(response.body).to include(expected_html)
expect(response.body).to include("Invite user")
expect(page).to have_link("Invite user")
end
it "shows a table of users" do

Loading…
Cancel
Save