This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests/unit/models
Jarek Radosz b78ab82284 DEV: Fix a flaky/leaky test
* pretender wasn't catching the request because it ran after this test finished
* restore wasn't needed, we do `sinon.restore()` after each test

The error was:
```
↪ Unit | Model | user::resolvedTimezone [✔]
↪ Unit | Utility | url::routeTo with prefixUnhandled request in test environment: /forum/u/chuck.json (PUT)
Error: Unhandled request in test environment: /forum/u/chuck.json (PUT)
    at Pretender.server.unhandledRequest (discourse/tests/setup-tests:173:15)
    at Pretender.handleRequest (pretender:400:14)
    at FakeRequest.send (pretender:169:21)
    at Object.send (jquery:10100:10)
    at Function.ajax (jquery:9683:15)
    at performAjax (discourse/app/lib/ajax:174:19)
    at eval (discourse/app/lib/ajax:183:11)
    at invokeCallback (ember:63104:17)
    at publish (ember:63087:9)
    at eval (ember:57463:16)
 [✘]
```

A minimal reproduction:
`http://localhost:3001/qunit?seed=3&testId=da76996b&testId=e52a53e7`
2021-06-22 09:49:09 +08:00
..
badge-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
category-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
composer-test.js DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
email-log-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
group-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
invite-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
nav-item-test.js DEV: Topic tracking state improvements (#13218) 2021-06-02 09:06:29 +10:00
post-stream-test.js DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
post-test.js DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
report-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
rest-model-test.js DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
result-set-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
session-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
site-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
staff-action-log-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
theme-test.js FIX: Tests in admin/tests were not running (#12391) 2021-03-17 13:02:12 -04:00
topic-details-test.js FIX: Base topic details message on current category and tag tracking state (#12937) 2021-05-06 09:14:07 +10:00
topic-test.js DEV: Remove JoyPixels emoji option (#12197) 2021-02-26 07:44:52 -05:00
topic-tracking-state-test.js DEV: Topic tracking state improvements (#13218) 2021-06-02 09:06:29 +10:00
user-action-test.js DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
user-badge-test.js FEATURE: lets users favorite 2 badges to show on user-card (#13151) 2021-06-01 10:33:40 +02:00
user-drafts-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
user-stream-test.js FEATURE: Add "Recently read topics" tab to user activity page (#12047) 2021-02-11 22:36:50 +05:30
user-test.js DEV: Fix a flaky/leaky test 2021-06-22 09:49:09 +08:00