diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index 421ad71e0..a45fc3ffe 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -4,7 +4,7 @@ <% @organisation.display_attributes.each do |attr, val| %> <%= summary_list.row do |row| row.key { attr.to_s.humanize } - row.value { simple_format(val, {}, wrapper_tag: "div") } + row.value { simple_format(val.to_s, {}, wrapper_tag: "div") } end %> <% end %> <% end %> diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb new file mode 100644 index 000000000..fadc1706c --- /dev/null +++ b/spec/requests/organisations_controller_spec.rb @@ -0,0 +1,17 @@ +require "rails_helper" + +RSpec.describe OrganisationsController, type: :request do + let(:user) { FactoryBot.create(:user) } + let(:organisation) { user.organisation } + let(:headers) { { "Accept" => "text/html" } } + + before do + sign_in user + get "/organisations/#{organisation.id}", headers: headers, params: {} + end + + it "shows the tab navigation" do + expected_html = "