aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_stanza_spec.lua
Commit message (Collapse)AuthorAgeFilesLines
* util.stanza: Add add_error() to simplify adding error tags to existing stanzasMatthew Wild2022-08-291-0/+14
| | | | | Some fiddling is required now in error_reply() to ensure the cursor is in the same place as before this change (a lot of code apparently uses that feature).
* util.stanza: Cover :find method in testsKim Alvefur2021-12-311-0/+12
| | | | This method is a bit complex so good to have some test coverage
* util.stanza: Increase test coverage to cover validation errorsKim Alvefur2021-12-311-0/+25
|
* util.stanza: Add :get_child_with_attr() + testsMatthew Wild2021-09-121-0/+20
|
* Merge 0.11->trunkKim Alvefur2020-11-111-0/+1
|\
| * util.stanza: Reject ASCII control characters (fixes #1606)Kim Alvefur2020-11-111-0/+1
| |
* | util.stanza: Extract Application-Specific Condition from errorsKim Alvefur2020-09-261-0/+13
| | | | | | | | API change
* | spec.stanza spec: Split up util.error related testsKim Alvefur2020-09-261-0/+8
| |
* | util.stanza: Support Application-Specific Conditions in util.errorKim Alvefur2020-09-261-1/+13
| |
* | util.stanza: Get 'by' from context insteadKim Alvefur2020-09-261-1/+1
| | | | | | | | | | | | | | Zash> <error by=?> should go where? extra.by? context? source? Zash> In Prosody this would usually be module.host or a bare user/room JID MattJ> Zash: context MattJ> context.by, basically the opposite of context.actor
* | util.stanza: Support inclusion of <gone> URI from util.error objectKim Alvefur2020-09-261-0/+5
| |
* | util.stanza: Support getting 'by' from util.error objectKim Alvefur2020-09-261-1/+2
| |
* | util.stanza: Add method returning stanza with added indentationKim Alvefur2020-04-121-0/+8
| | | | | | | | | | Adds indentation and line breaks to stanzas, to make stanzas easier to read for humans.
* | util.stanza: Accept util.error object to error_replyKim Alvefur2019-12-141-0/+17
| | | | | | | | | | | | | | | | If we're moving towards util.error as the standard error container then this makes sense. This may allow for future extensibility without needing a lot of optional arguments.
* | util.stanza: Support the 'by' attribute on errorsKim Alvefur2019-11-251-1/+2
| | | | | | | | | | This is to be used when the entity generating the error is not the same as the one the stanza was directed to, e.g. an intermediate server.
* | util.stanza: Check that argument to error_reply is NOT a stanza of type errorKim Alvefur2019-11-251-0/+10
| | | | | | | | Replying to an error is Very Bad
* | util.stanza: Check that argument to error_reply is a stanzaKim Alvefur2019-11-251-0/+6
| |
* | util.stanza: Remove redundant check for attrsKim Alvefur2019-11-251-0/+7
| | | | | | | | A stanza can't not have attrs if created the correct way
* | util.stanza: Check that argument to reply is a stanzaKim Alvefur2019-11-251-0/+6
| |
* | util.stanza: Fix :top_tag() handling of namespaced attributesMatthew Wild2019-03-251-0/+31
| |
* | util.stanza: Require a type attribute for iq stanzasKim Alvefur2018-12-281-4/+15
|/
* util.stanza: Improve testsKim Alvefur2018-12-021-9/+19
|
* util.stanza: Validate input to clone() (with brief tests)Kim Alvefur2018-11-171-0/+14
|
* util.stanza tests: Remove unused variable #luacheckMatthew Wild2018-09-131-2/+2
|
* util.stanza: Don't automatically generate ids for iq stanzasMatthew Wild2018-09-131-3/+14
| | | | | | | | | | Users of this API should provide their own id attribute that meets their uniqueness requirements. The current implementation leaks information (i.e. how many iq stanzas have been sent by the server to other JIDs). Providing any strong guarantees of randomness here would need to pull in additional dependencies that we don't want in this simple library.
* util.stanza tests: Fix test name (copy/paste error?)Matthew Wild2018-09-131-1/+1
|
* util.stanza + tests: Bail out of loop if we are iterating too far, fixes #981Matthew Wild2018-08-191-0/+7
|
* util.stanza tests: Add tests for maptags() methodMatthew Wild2018-08-191-0/+71
|
* util.stanza: Brief tests for :remove_childrenKim Alvefur2018-07-081-0/+22
|
* util.stanza: tests: Add more invalid data types and update for :text(nil) ↵Matthew Wild2018-03-211-10/+20
| | | | and :text("")
* util.stanza: Switch from asserts to if's, improve performance, errors and testsMatthew Wild2018-03-181-26/+37
|
* util.stanza: Test coverage of is_stanza()Kim Alvefur2018-03-171-0/+16
|
* util.stanza: Add stricter validation for data passed to stanza builder APIMatthew Wild2018-03-161-0/+34
|
* util.stanza: Add tests ensuring support for unicode in tag/attr namesMatthew Wild2018-03-161-0/+6
|
* util.stanza: Fix tests to call error_reply() correctly, and add tests to ↵Matthew Wild2018-03-161-2/+4
| | | | ensure it vaguely works
* Port tests to the `busted` test runnerWaqas Hussain2017-09-151-0/+159