rspec-sse-matchers 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rspec/sse/matchers/version.rb +1 -1
- data/lib/rspec/sse/matchers.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb59580533e9cd9424757c013ba82dc7f6735ad1064e434a30601f5e388d9423
|
4
|
+
data.tar.gz: 781c89151d3c0bf01cdc463cce0e3cab5ebeee1b280c5834d9dfc626a5687a2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 554de4d1324acc2c018c5ef9900455475972c81f6b376d1874c2c7f6515efa5eca56534d55355d4a013729fed74d577dfb1fab48c9032b425e373cabe6374b5e
|
7
|
+
data.tar.gz: ded963231f3c11f214c2c0bcac8ab2cc21ca9d1b36ce9ed473e991f4d874f5e4ab92d2a8bf5771101780fe67335dc3cb36b1c4ae49964ed0ac856d460f8b8f97
|
data/lib/rspec/sse/matchers.rb
CHANGED
@@ -278,18 +278,17 @@ module RSpec
|
|
278
278
|
@actual = actual
|
279
279
|
@actual.headers["content-type"] == "text/event-stream" \
|
280
280
|
&& @actual.headers["cache-control"]&.match(/no-(?:store|cache)/) \
|
281
|
-
&& @actual.headers["content-length"].nil? \
|
282
281
|
&& @actual.status == 200
|
283
282
|
end
|
284
283
|
|
285
284
|
# @rbs return: String
|
286
285
|
def failure_message
|
287
|
-
"Expected response header of `content-type` is `text/event-stream`, `cache-control` contains `no-store
|
286
|
+
"Expected response header of `content-type` is `text/event-stream`, `cache-control` contains `no-store` or `no-cache`, and status code is `2xx`"
|
288
287
|
end
|
289
288
|
|
290
289
|
# @rbs return: String
|
291
290
|
def failure_message_when_negated
|
292
|
-
"Expected response header of `content-type` is not `text/event-stream`, `cache-control` does not contain `no-store
|
291
|
+
"Expected response header of `content-type` is not `text/event-stream`, `cache-control` does not contain `no-store` or `no-cache`, and/or status code is not `2xx`"
|
293
292
|
end
|
294
293
|
|
295
294
|
# @rbs return: String
|