Steve Howell
aea074e744
Use stream_id for by_stream_topic_uri().
2018-12-14 16:05:40 -08:00
Steve Howell
a2fd901bec
hashchange: Add hash_util.get_hash_section().
...
We'll use this mostly for streams/settings URLs at first.
2018-12-07 08:03:41 -08:00
Steve Howell
44ef8baff1
hashchange: Add hash_util.get_hash_category().
...
This replaces hashchange.get_main_hash(), which had
a slightly misleading name. Also, moving this to
hash_util forces us to keep 100% coverage on it.
2018-12-04 17:16:40 -08:00
Steve Howell
67fba69b0c
hashchange: Go to home page for bogus narrows.
...
This was the original intent of the code, and I think
it's the right behavior.
2018-12-04 17:16:38 -08:00
Steve Howell
bcb142e68e
hashchange: Move parse_narrow to hash_util.js.
...
The goal here was to enforce 100% coverage on
parse_narrow, but the code has an unreachable line
and is overly tolerant of bogus urls. This will
be fixed in the next commit.
2018-12-04 17:16:32 -08:00
Steve Howell
623e3f3c9f
hashchange: Extract hash_util.stream_edit_uri.
2018-12-02 19:07:19 -08:00
Steve Howell
328e2ff316
Fix "Copy link to conversation" links.
...
This cleans up the code for stream links
and creates nicer, more correct links for
PMs.
Fixes #10605
2018-10-22 12:22:26 -07:00
Joshua Pan
5303281dfb
tests: Fully cover hash_util.js.
2018-08-04 17:56:02 -07:00
Steve Howell
42435db492
Add run_test helper for individual tests.
...
This run_test helper sets up a convention that allows
us to give really short tracebacks for errors, and
eventually we can have more control over running
individual tests. (The latter goal has some
complications, since we often intentionally leak
setup in tests.)
2018-05-15 08:24:44 -07:00
Tarun Kumar
deab3ac541
hash_util: Add 100% node-coverage for hash_util.js.
2018-04-19 14:59:08 -04:00