File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Sources/RediStack/Commands
Tests/RediStackIntegrationTests/Commands Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ extension RedisCommand {
46
46
47
47
/// [PUBSUB NUMPAT](https://redis.io/commands/pubsub#codepubsub-numpatcode)
48
48
public static func pubsubNumpat( ) -> RedisCommand < Int > {
49
- return . init( keyword: " PUBSUB NUMPAT " , arguments: [ ] )
49
+ return . init( keyword: " PUBSUB " , arguments: [ . init ( bulk : " NUMPAT " ) ] )
50
50
}
51
51
52
52
/// [PUBSUB NUMSUB](https://redis.io/commands/pubsub#codepubsub-numsub-channel-1--channel-ncode)
Original file line number Diff line number Diff line change @@ -190,6 +190,14 @@ final class RedisPubSubCommandsTests: RediStackIntegrationTestCase {
190
190
self . waitForExpectations ( timeout: 1 )
191
191
}
192
192
193
+ func test_pubSubNumpat( ) throws {
194
+ let queryConnection = try self . makeNewConnection ( )
195
+ defer { try ? queryConnection. close ( ) . wait ( ) }
196
+
197
+ let numPat = try queryConnection. send ( . pubsubNumpat( ) ) . wait ( )
198
+ XCTAssertGreaterThanOrEqual ( numPat, 0 )
199
+ }
200
+
193
201
func test_pubSubChannels( ) throws {
194
202
let fn = #function
195
203
let subscriber = try self . makeNewConnection ( )
You can’t perform that action at this time.
0 commit comments