Closed cdauphinee closed 4 years ago
Thank you @cdauphinee
I think we need a couple more changes here 1) this: https://github.com/pusher/pusher-websocket-dotnet/blob/9520df2d0bd986f6b4550e03b6b915915cbe25f8/PusherClient.Tests/AcceptanceTests/EventEmitter.cs#L67 has to change to something like:
StringAssert.AreEqualIgnoringCase("{\"stuff\":1234}", emittedEvent.Data);
2) this has to change accordingly: https://github.com/pusher/pusher-websocket-dotnet/blob/9520df2d0bd986f6b4550e03b6b915915cbe25f8/PusherClient.Tests/AcceptanceTests/EventEmitter.cs#L357 to ->
eventData["data"] = jObject["data"].ToString(); // undo any kind of deserialisation
Could you include these as well? Thank you :)
:+1: Updated the test to be consistent with the new code
Great! Thank you!
This fixes a bug where the
Data
property of thePusherEvent
is being wrapped in an extra pair of double quotes. i.e. the property would contain"{"foo":"bar"}"
instead of the expected{"foo":"bar"}
We've already coerced
jObject["data"]
into an unformatted string earlier, so it shouldn't be necessary to specify formatting here.