Skip to content
Snippets Groups Projects
Commit 2846887e authored by Aaron Bohy's avatar Aaron Bohy
Browse files

[FIX] web: mockServer and mockEnvironment

Fixes two issues in the test environment:

- for unset fields, the mockRead is supposed to return 0 (numerical
  fields), empty array (x2many fields) or false (otherwise). Except
  for the first case, it was returning undefined, and this might
  cause crashes when evaluating contexts or domains.
- the mock environment allows overriding some global properties
  like the session, for the test case only. Once the widget is
  destroyed, those global properties are reset to their original
  value. This wasn't working for models tests, because the destroy
  function of the parent widget was never called. This could make
  tests fail as they could have been impacted by other tests.
parent 514c8e5c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment