@ -45,7 +45,7 @@ private
end
def authenticate_scope!
head :not_found if current_user.organisation != @organisation
render_not_found if current_user.organisation != @organisation
def find_resource
@ -74,6 +74,6 @@ private
head :not_found if current_user != @user
render_not_found if current_user != @user
@ -50,6 +50,10 @@ RSpec.describe OrganisationsController, type: :request do
it "returns not found 404 from org route" do
expect(response).to have_http_status(:not_found)
it "shows the 404 view" do
expect(page).to have_content("Page not found")
@ -87,6 +87,10 @@ RSpec.describe UsersController, type: :request do
it "returns not found 404" do