[Koha-bugs] [Bug 24003] REST API basic auth lacks C4::Context->userenv

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 8 15:50:45 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24003

--- Comment #1 from Lari Taskula <lari.taskula at hypernova.fi> ---
Created attachment 95228
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95228&action=edit
Bug 24003: Add a failing test for missing userenv for REST basic auth

When using REST API via basic authentication method, C4::Context->userenv
returns undef.

This patch adds a failing test to prove it.

To test:
1. prove t/db_dependent/api/v1/auth_basic.t
2. Observe failures:

    not ok 5 - exact match for JSON Pointer "/userenv/number"
       Failed test 'exact match for JSON Pointer "/userenv/number"'
       at t/db_dependent/api/v1/auth_basic.t line 52.
              got: undef
         expected: '1054'
    not ok 6 - exact match for JSON Pointer "/userenv/id"
       Failed test 'exact match for JSON Pointer "/userenv/id"'
       at t/db_dependent/api/v1/auth_basic.t line 52.
              got: undef
         expected: 'tomasito'

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list