Skip to content

Commit

Permalink
test: add case for passwords containing +
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Oct 23, 2019
1 parent a7095d7 commit 66920f1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unit/redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ describe("Redis", function() {
expect(option).to.have.property("password", "authpassword");
expect(option).to.have.property("db", 4);

option = getOption("redis://:[email protected]:6380");
expect(option).to.have.property("password", "1+1");

option = getOption(
`redis://127.0.0.1:6380/?password=${encodeURIComponent("1+1")}`
);
expect(option).to.have.property("password", "1+1");

option = getOption("redis://127.0.0.1/");
expect(option).to.have.property("db", 0);

Expand Down

0 comments on commit 66920f1

Please sign in to comment.