Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xh3b4sd committed Sep 27, 2023
1 parent 9f7d77a commit 5e8d80a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pkg/sorted/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/xh3b4sd/redigo/pkg/pool"
)

func Test_Create_Score_Input_Error(t *testing.T) {
func Test_Create_Index_Input_Error(t *testing.T) {
testCases := []struct {
ind []string
}{
Expand Down Expand Up @@ -64,15 +64,15 @@ func Test_Create_Score_Input_Error(t *testing.T) {
cre = mustNewCreateWithConn(con)
}

err := cre.Score("ssk", "foo", 0.8, tc.ind...)
err := cre.Index("ssk", "foo", 0.8, tc.ind...)
if !IsExecutionFailedError(err) {
t.Fatal("expected", executionFailedError, "got", err)
}
})
}
}

func Test_Create_Score_Input_Valid(t *testing.T) {
func Test_Create_Index_Input_Valid(t *testing.T) {
testCases := []struct {
ind []string
}{
Expand Down Expand Up @@ -105,7 +105,7 @@ func Test_Create_Score_Input_Valid(t *testing.T) {
cre = mustNewCreateWithConn(con)
}

err := cre.Score("ssk", "foo", 0.8, tc.ind...)
err := cre.Index("ssk", "foo", 0.8, tc.ind...)
if err != nil {
t.Fatal(err)
}
Expand All @@ -124,7 +124,7 @@ func mustNewCreateWithConn(con redis.Conn) *create {
c = &create{
pool: p,

createScoreScript: redis.NewScript(2, createScoreScript),
createIndexScript: redis.NewScript(2, createIndexScript),

prefix: "prefix",
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/sorted/sorted.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func New(config Config) (*Sorted, error) {
cre = &create{
pool: config.Pool,

createScoreScript: redis.NewScript(2, createScoreScript),
createIndexScript: redis.NewScript(2, createIndexScript),

prefix: config.Prefix,
}
Expand Down

0 comments on commit 5e8d80a

Please sign in to comment.