Sha256: 230de9ee7d0c46005c61ef3e4c87d4a6642d72608cb3b1075da60623cdfde051

Contents?: true

Size: 647 Bytes

Versions: 4

Compression:

Stored size: 647 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe RedisWebManager::Action do
  let(:action) do
    RedisWebManager::Action.new
  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

4 entries across 4 versions & 1 rubygems

Version Path
redis_web_manager-0.2.1 spec/redis_web_manager_action_spec.rb
redis_web_manager-0.2.0 spec/redis_web_manager_action_spec.rb
redis_web_manager-0.1.8 spec/redis_web_manager_action_spec.rb
redis_web_manager-0.1.6 spec/redis_web_manager_action_spec.rb