Skip to content

Commit 4bae9ac

Browse files
committed
add testing of request body
1 parent 5524fb4 commit 4bae9ac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/web_push_test.exs

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ defmodule WebPushTest do
1919
assert Map.get(request.headers, "Urgency") == "normal"
2020

2121
assert request.body == WebPush.decode(expected())
22+
23+
<<salt::binary-size(16), rs::unsigned-big-integer-size(32), idlen::8,
24+
keyid::binary-size(idlen), _ciphertext::binary>> = request.body
25+
26+
assert salt == salt()
27+
assert rs == 4096
28+
assert idlen == 65
29+
assert keyid == elem(as_key_pair(), 0)
2230
end
2331
end
2432

0 commit comments

Comments
 (0)