Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions uts/docs/writing-test-specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ mock_http = MockHttpClient(
onConnectionAttempt: (conn) => conn.respond_with_success(),
onRequest: (req) => {
captured_request = req
req.respond_with(200, {"time": 1234567890000})
req.respond_with(200, [1234567890000])
}
)
install_mock(mock_http)
Expand Down Expand Up @@ -212,7 +212,7 @@ connection.respond_with_success()
# Wait for and handle request
request = AWAIT mock_http.await_request()
ASSERT request.headers["X-Ably-Version"] IS NOT null
request.respond_with(200, {"time": 1234567890000})
request.respond_with(200, [1234567890000])

# Complete operation
result = AWAIT request_future
Expand Down Expand Up @@ -1034,7 +1034,7 @@ onRequest: (req) => {
```pseudo
onRequest: (req) => {
IF req.url.path CONTAINS "/time":
req.respond_with(200, {"time": ...})
req.respond_with(200, [...])
ELSE IF req.url.path CONTAINS "/channels":
req.respond_with(200, [...])
}
Expand Down
2 changes: 1 addition & 1 deletion uts/rest/unit/auth/authorize.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ mock_http = MockHttpClient(
captured_requests.append(req)
IF req.url.path == "/time":
# Time query
req.respond_with(200, { "time": 1234567890000 })
req.respond_with(200, [1234567890000])
ELSE:
# Token request
req.respond_with(200, {
Expand Down
Loading
Loading