Sha256: dce9fb65645a84dfd1f6c64b9101018ead0bd357f38c24b21b7bb0bd37575ce1

Contents?: true

Size: 543 Bytes

Versions: 9

Compression:

Stored size: 543 Bytes

Contents

require 'spec_helper'

module Rmega
  describe Utils do
    describe '#base64urlencode' do
      it 'returns the expected value' do
        string = 'ice_lord'
        result = 'aWNlX2xvcmQ'
        expect(described_class.base64urlencode(string)).to eq(result)
      end
    end

    describe '#base64urldecode' do
      it 'returns the expected value' do
        encoded_value = "c29ycnkgaSBhbSBidXN5"
        result = "sorry i am busy"
        expect(described_class.base64urldecode(encoded_value)).to eq(result)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rmega-0.3.2 spec/rmega/lib/utils_spec.rb
rmega-0.3.1 spec/rmega/lib/utils_spec.rb
rmega-0.2.7 spec/rmega/lib/utils_spec.rb
rmega-0.2.6 spec/rmega/lib/utils_spec.rb
rmega-0.2.5 spec/rmega/lib/utils_spec.rb
rmega-0.2.4 spec/rmega/lib/utils_spec.rb
rmega-0.2.2 spec/rmega/lib/utils_spec.rb
rmega-0.2.1 spec/rmega/lib/utils_spec.rb
rmega-0.2.0 spec/rmega/lib/utils_spec.rb