Skip to content

Commit 2775519

Browse files
committed
Update tests for latest redis-client
1 parent 7cc45e5 commit 2775519

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/lint/streams.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def test_xtrim_with_limit_option
135135

136136
assert_equal 1, redis.xtrim('s1', 0, approximate: true, limit: 1)
137137
error = assert_raises(Redis::CommandError) { redis.xtrim('s1', 0, limit: 1) }
138-
assert_equal "ERR syntax error, LIMIT cannot be used without the special ~ option", error.message
138+
assert_includes error.message, "ERR syntax error, LIMIT cannot be used without the special ~ option"
139139
ensure
140140
redis.config(:set, 'stream-node-max-entries', original)
141141
end
@@ -174,7 +174,7 @@ def test_xtrim_with_invalid_strategy
174174

175175
redis.xadd('s1', { f: 'v1' })
176176
error = assert_raises(Redis::CommandError) { redis.xtrim('s1', '1-0', strategy: '') }
177-
assert_equal "ERR syntax error", error.message
177+
assert_includes error.message, "ERR syntax error"
178178
end
179179

180180
def test_xtrim_with_not_existed_stream

test/redis/connection_test.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,27 @@ def test_connection_information
3737

3838
def test_default_id_with_host_and_port
3939
redis = Redis.new(OPTIONS.merge(host: "host", port: "1234", db: 0))
40-
assert_equal "redis://host:1234/0", redis.connection.fetch(:id)
40+
assert_equal "redis://host:1234", redis.connection.fetch(:id)
4141
end
4242

4343
def test_default_id_with_host_and_port_and_ssl
4444
redis = Redis.new(OPTIONS.merge(host: 'host', port: '1234', db: 0, ssl: true))
45-
assert_equal "rediss://host:1234/0", redis.connection.fetch(:id)
45+
assert_equal "rediss://host:1234", redis.connection.fetch(:id)
4646
end
4747

4848
def test_default_id_with_host_and_port_and_explicit_scheme
4949
redis = Redis.new(OPTIONS.merge(host: "host", port: "1234", db: 0))
50-
assert_equal "redis://host:1234/0", redis.connection.fetch(:id)
50+
assert_equal "redis://host:1234", redis.connection.fetch(:id)
5151
end
5252

5353
def test_default_id_with_path
5454
redis = Redis.new(OPTIONS.merge(path: "/tmp/redis.sock", db: 0))
55-
assert_equal "/tmp/redis.sock/0", redis.connection.fetch(:id)
55+
assert_equal "unix:///tmp/redis.sock", redis.connection.fetch(:id)
5656
end
5757

5858
def test_default_id_with_path_and_explicit_scheme
5959
redis = Redis.new(OPTIONS.merge(path: "/tmp/redis.sock", db: 0))
60-
assert_equal "/tmp/redis.sock/0", redis.connection.fetch(:id)
60+
assert_equal "unix:///tmp/redis.sock", redis.connection.fetch(:id)
6161
end
6262

6363
def test_override_id

0 commit comments

Comments
 (0)