File: distributed_sorting_test.rb

package info (click to toggle)
ruby-redis 4.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,168 kB
  • sloc: ruby: 12,820; makefile: 107; sh: 24
file content (19 lines) | stat: -rw-r--r-- 385 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require_relative "helper"

class TestDistributedSorting < Minitest::Test
  include Helper::Distributed

  def test_sort
    assert_raises(Redis::Distributed::CannotDistribute) do
      r.set("foo:1", "s1")
      r.set("foo:2", "s2")

      r.rpush("bar", "1")
      r.rpush("bar", "2")

      r.sort("bar", get: "foo:*", limit: [0, 1])
    end
  end
end