File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ class Namespace
104
104
"linsert" => [ :first ] ,
105
105
"llen" => [ :first ] ,
106
106
"lpop" => [ :first ] ,
107
+ "lpos" => [ :first ] ,
107
108
"lpush" => [ :first ] ,
108
109
"lpushx" => [ :first ] ,
109
110
"lrange" => [ :first ] ,
Original file line number Diff line number Diff line change 100
100
expect ( @redis . get ( 'foo' ) ) . to eq ( 'bar' )
101
101
end
102
102
103
+ it 'should be able to use a namespace with lpos' do
104
+ @namespaced . rpush ( 'foo' , %w[ a b c 1 2 3 c c ] )
105
+ expect ( @namespaced . lpos ( 'foo' , 'c' ) ) . to eq ( 2 )
106
+ expect ( @redis . lpos ( 'mykey' , 'c' ) ) . to be_nil
107
+ end
108
+
103
109
it 'should be able to use a namespace with brpoplpush' do
104
110
@namespaced . lpush ( 'foo' , 'bar' )
105
111
expect ( @namespaced . brpoplpush ( 'foo' , 'bar' , 0 ) ) . to eq ( 'bar' )
You can’t perform that action at this time.
0 commit comments