Improve tests and ensure json formatted responses continue working

Created on 23 August 2022, almost 3 years ago
Updated 19 May 2025, 6 days ago

Problem/Motivation

When lupus-ce-renderer is enabled, routes default to CE format. But special JSON endpoints should still work as is.
This is working, but misses some test-coverage.

Note: We deny format "html" format, this is implemented and tested.
But we lack test-coverage for making sure json is allowed.

📌 Task
Status

Needs review

Version

2.0

Component

Code

Created by

🇦🇹Austria fago Vienna

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇹Austria fago Vienna

    ok, I took a look at this. First off, I made sure we have a good kernel test as base and ported over the existing functional tests to a kernel test. While I were there I also extended coverage for some things that had no coverage before, like redirect handling.

    Then I also added the test for this and verified the core user-login-status json API still works with the module.

  • @fago opened merge request.
  • 🇸🇮Slovenia useernamee Ljubljana

    Looks good. Most of assertions from functional tests are covered (and many new test cases are added, redirect and unsupported) in the new kernel test - I found one that's missing and I'm wondering if it is really needed (Overriding settings parameter is not allowed.).

  • 🇦🇹Austria fago Vienna

    thanks!

    > Overriding settings parameter is not allowed
    True. Thanks for spotting. I agree it's not important to test, the whole feature of enabling it via settings is quite obsolete, still supported, but this detail seems to be not important for it either, so I'm fine continuing without testing this.

    Thus, merged - thank you!

    • fago committed b9c796c9 on 2.x
      Issue #3305490 by fago, useernamee: Improve tests and ensure json...
Production build 0.71.5 2024