NEO-28: Wrap long lines for gdlint (ability cast + tests).
parent
c3acbdb373
commit
0bce6ed74c
|
|
@ -1,7 +1,8 @@
|
|||
extends Node
|
||||
|
||||
## NEO-31: prototype HTTP client for `POST /game/players/{id}/ability-cast`.
|
||||
## NEO-28: emits [signal cast_result_received] when the response body is JSON [AbilityCastResponse] v1.
|
||||
## NEO-28: emits [signal cast_result_received] when the response body is JSON
|
||||
## [AbilityCastResponse] v1.
|
||||
signal cast_result_received(accepted: bool, reason_code: String)
|
||||
|
||||
@export var base_url: String = "http://127.0.0.1:5253"
|
||||
|
|
|
|||
|
|
@ -149,7 +149,11 @@ func test_cast_result_received_emits_false_with_reason_on_denied() -> void:
|
|||
)
|
||||
var c := _make_client(transport)
|
||||
var got: Array = []
|
||||
c.connect("cast_result_received", func(accepted: bool, reason: String): got.append([accepted, reason]))
|
||||
c.connect(
|
||||
"cast_result_received",
|
||||
func(accepted: bool, reason: String) -> void:
|
||||
got.append([accepted, reason])
|
||||
)
|
||||
# Act
|
||||
var started: bool = bool(c.call("request_cast", 0, "prototype_pulse", "prototype_target_alpha"))
|
||||
# Assert
|
||||
|
|
@ -165,7 +169,11 @@ func test_cast_result_received_emits_true_with_empty_reason_on_accepted() -> voi
|
|||
transport.enqueue(HTTPRequest.RESULT_SUCCESS, 200, '{"schemaVersion":1,"accepted":true}')
|
||||
var c := _make_client(transport)
|
||||
var got: Array = []
|
||||
c.connect("cast_result_received", func(accepted: bool, reason: String): got.append([accepted, reason]))
|
||||
c.connect(
|
||||
"cast_result_received",
|
||||
func(accepted: bool, reason: String) -> void:
|
||||
got.append([accepted, reason])
|
||||
)
|
||||
# Act
|
||||
var started: bool = bool(c.call("request_cast", 0, "prototype_pulse", null))
|
||||
# Assert
|
||||
|
|
|
|||
Loading…
Reference in New Issue