|
81 | 81 | with ".for" do
|
82 | 82 | it "handles IPv4 addresses correctly" do
|
83 | 83 | endpoint = Async::Redis::Endpoint.for("redis", "127.0.0.1", port: 6380)
|
84 |
| - expect(endpoint.url.to_s).to be == "redis://127.0.0.1:6380/" |
| 84 | + expect(endpoint.url.to_s).to be == "redis://127.0.0.1:6380" |
85 | 85 | expect(endpoint.url.host).to be == "127.0.0.1"
|
86 | 86 | expect(endpoint.url.hostname).to be == "127.0.0.1"
|
87 | 87 | expect(endpoint.port).to be == 6380
|
88 | 88 | end
|
89 | 89 |
|
90 | 90 | it "handles IPv6 addresses correctly" do
|
91 | 91 | endpoint = Async::Redis::Endpoint.for("redis", "::1", port: 6380)
|
92 |
| - expect(endpoint.url.to_s).to be == "redis://[::1]:6380/" |
| 92 | + expect(endpoint.url.to_s).to be == "redis://[::1]:6380" |
93 | 93 | expect(endpoint.url.host).to be == "[::1]"
|
94 | 94 | expect(endpoint.url.hostname).to be == "::1"
|
95 | 95 | expect(endpoint.port).to be == 6380
|
|
98 | 98 | it "handles expanded IPv6 addresses correctly" do
|
99 | 99 | ipv6 = "2600:1f28:372:c404:5c2d:ce68:3620:cc4b"
|
100 | 100 | endpoint = Async::Redis::Endpoint.for("redis", ipv6, port: 6380)
|
101 |
| - expect(endpoint.url.to_s).to be == "redis://[#{ipv6}]:6380/" |
| 101 | + expect(endpoint.url.to_s).to be == "redis://[#{ipv6}]:6380" |
102 | 102 | expect(endpoint.url.host).to be == "[#{ipv6}]"
|
103 | 103 | expect(endpoint.url.hostname).to be == ipv6
|
104 | 104 | expect(endpoint.port).to be == 6380
|
105 | 105 | end
|
106 | 106 |
|
107 | 107 | it "handles credentials correctly" do
|
108 | 108 | endpoint = Async::Redis::Endpoint.for("redis", "localhost", credentials: ["user", "pass"], port: 6380)
|
109 |
| - expect(endpoint.url.to_s).to be == "redis://user:pass@localhost:6380/" |
| 109 | + expect(endpoint.url.to_s).to be == "redis://user:pass@localhost:6380" |
110 | 110 | expect(endpoint.url.userinfo).to be == "user:pass"
|
111 | 111 | expect(endpoint.credentials).to be == ["user", "pass"]
|
112 | 112 | end
|
|
120 | 120 |
|
121 | 121 | it "handles secure connections correctly" do
|
122 | 122 | endpoint = Async::Redis::Endpoint.for("rediss", "localhost")
|
123 |
| - expect(endpoint.url.to_s).to be == "rediss://localhost/" |
| 123 | + expect(endpoint.url.to_s).to be == "rediss://localhost" |
124 | 124 | expect(endpoint).to be(:secure?)
|
125 | 125 | end
|
126 | 126 |
|
|
0 commit comments