Conversation
|
I think the spec's wording is actually stricter here: I think it's saying that Should we be asserting that |
|
Makes sense, yea. |
|
I thought that recently got fixed in synapse. |
|
|
Hm, what happens if the returned If so, we probably can't assert that |
tests/10apidoc/34room-messages.pl
Outdated
| scalar @{ $body->{chunk} } > 0 or | ||
| die "Expected some messages but got none at all\n"; | ||
| })->then( sub { | ||
|
|
tests/10apidoc/34room-messages.pl
Outdated
|
|
||
| # With no params this does "forwards from END"; i.e. nothing useful |
There was a problem hiding this comment.
I don't think this needs repeating here
| # With no params this does "forwards from END"; i.e. nothing useful |
tests/10apidoc/34room-messages.pl
Outdated
| die "Expected some messages but got none at all\n"; | ||
| })->then( sub { | ||
|
|
||
| # Do another call to /messages, this time we don't expect to receive a "end" key |
There was a problem hiding this comment.
| # Do another call to /messages, this time we don't expect to receive a "end" key | |
| # Do another call to /messages. This time we don't expect to receive a "end" key |
tests/10apidoc/34room-messages.pl
Outdated
| })->then( sub { | ||
| my ( $body ) = @_; | ||
|
|
||
| # We should still get events and a "end" key, check it is actually there |
There was a problem hiding this comment.
| # We should still get events and a "end" key, check it is actually there | |
| # We should still get events and a "end" key: check they are actually there |
tests/10apidoc/34room-messages.pl
Outdated
| log_if_fail "Body", $body; | ||
|
|
||
|
|
||
| # We should still get events and a "end" key, check it is actually there |
There was a problem hiding this comment.
| # We should still get events and a "end" key, check it is actually there | |
| # We should still get events and a "end" key: check they are actually there |
tests/10apidoc/34room-messages.pl
Outdated
| die "Expected some messages but got none at all\n"; | ||
|
|
||
| })->then( sub { | ||
| # Do another call to /messages, this time we don't expect to receive a "end" key |
There was a problem hiding this comment.
| # Do another call to /messages, this time we don't expect to receive a "end" key | |
| # Do another call to /messages. This time we don't expect to receive a "end" key |
tests/10apidoc/34room-messages.pl
Outdated
|
|
||
| # With no params this does "forwards from END"; i.e. nothing useful |
There was a problem hiding this comment.
| # With no params this does "forwards from END"; i.e. nothing useful |
As per the spec, the
endkey is not required if there are no more events for the user.