api docs: Test sample fixture for nonexistent stream error.

In templates/zerver/api/stream-message.md, we have a sample fixture
for when the target stream does not exist. This commit adds a test
for that sample fixture.
This commit is contained in:
Eeshan Garg
2018-02-16 15:55:59 -03:30
committed by Tim Abbott
parent 4d54515455
commit 93b44a41c5
4 changed files with 23 additions and 16 deletions

View File

@@ -251,6 +251,19 @@ def stream_message(client):
return message_id
def test_nonexistent_stream_error(client):
# type: (Client) -> None
request = {
"type": "stream",
"to": "nonexistent_stream",
"subject": "Castle",
"content": "Something is rotten in the state of Denmark."
}
result = client.send_message(request)
fixture = FIXTURES['nonexistent-stream-error']
test_against_fixture(result, fixture)
def private_message(client):
# type: (Client) -> None
@@ -394,6 +407,8 @@ def test_messages(client):
update_message(client, message_id)
private_message(client)
test_nonexistent_stream_error(client)
def test_users(client):
# type: (Client) -> None