Sha256: c7200e4e92f66c98d2db3aa01aa6bb387c1e307a22fff3ef0961c59d83d7c309

Contents?: true

Size: 680 Bytes

Versions: 7

Compression:

Stored size: 680 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe RedisWebManager::Action do
  let(:action) do
    RedisWebManager::Action.new(RedisWebManager.redises.keys[0])
  end

  let(:redis) do
    ::Redis.new
  end

  describe 'action' do
    it 'returns a OK (flushall)' do
      expect(action.flushall).to eql('OK')
    end

    it 'returns a OK (flushdb)' do
      expect(action.flushdb).to eql('OK')
    end

    it 'returns a 1 (del)' do
      redis.set('test', 'test')
      expect(action.del('test')).to eql(1)
    end

    it 'returns a OK (rename)' do
      redis.set('test', 'test')
      expect(action.rename('test', 'test2')).to eql('OK')
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
redis_web_manager-0.3.6 spec/redis_web_manager_action_spec.rb
redis_web_manager-0.3.5 spec/redis_web_manager_action_spec.rb
redis_web_manager-0.3.4 spec/redis_web_manager_action_spec.rb
redis_web_manager-0.3.3 spec/redis_web_manager_action_spec.rb
redis_web_manager-0.3.2 spec/redis_web_manager_action_spec.rb
redis_web_manager-0.3.1 spec/redis_web_manager_action_spec.rb
redis_web_manager-0.3.0 spec/redis_web_manager_action_spec.rb