Sha256: dc6b9f00e38ec0585420e32a7b6338e3f9c4e170db40bf5c355a94acbb0a98a1

Contents?: true

Size: 812 Bytes

Versions: 53

Compression:

Stored size: 812 Bytes

Contents

require 'helper'

class TextProcessorTest < Vault::TestCase
  include Vault::Test::EnvironmentHelpers

  def setup
    set_env 'FERNET_SECRET', 'Mcdej7RFV/yHDrs1P8mrYP9zcw4JxSyReqYyELDrRPY='
  end

  def test_roundtrip
    string = 'foo'
    write = Vault::Tools::TextEnc::Write.process(string)
    read  = Vault::Tools::TextEnc::Read.process(write)
    assert_equal string, read
  end

  def test_roundtrip2
    string = 'foo'
    write = Vault::Tools::TextEnc.write(string)
    read  = Vault::Tools::TextEnc.read(write)
    assert_equal string, read
  end

  def test_write_is_smaller_size
    string = 'foo' * 100
    write = Vault::Tools::TextEnc::Write.process(string)
    assert string.size > write.size, "Written String should be smaller than raw string"
  end

  def test_easy_named_functions

  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
vault-tools-0.4.12 test/text_processor_test.rb
vault-tools-0.4.11 test/text_processor_test.rb
vault-tools-0.4.10 test/text_processor_test.rb
vault-tools-0.4.9 test/text_processor_test.rb
vault-tools-0.4.8 test/text_processor_test.rb
vault-tools-0.4.7 test/text_processor_test.rb
vault-tools-0.4.6 test/text_processor_test.rb
vault-tools-0.4.5 test/text_processor_test.rb
vault-tools-0.4.4 test/text_processor_test.rb
vault-tools-0.4.3 test/text_processor_test.rb
vault-tools-0.4.2 test/text_processor_test.rb
vault-tools-0.4.1 test/text_processor_test.rb
vault-tools-0.4.0 test/text_processor_test.rb