Sha256: 774df58a085aff2517430b5122057773bd11f7da482bc38ef50d37b6dfa860f1

Contents?: true

Size: 737 Bytes

Versions: 1

Compression:

Stored size: 737 Bytes

Contents

require 'spec_helper'

describe Oplop::V1 do
  describe ".password" do
    context "tests from testdata.json (see Python implementation at http://code.google.com/p/oplop/)" do
      # loop around each "case" in testdata.yml
      Yajl::Parser.new.parse(File.new(File.dirname(__FILE__) + "/testdata/v1.json", 'r')).each do |testdata|
        specify testdata["why"] do
          password = Oplop::V1.password(:master => testdata["master"], :label => "*" + testdata["label"])
          expect(password).to eq testdata["password"]

          password = Oplop::V1.password(:master => testdata["master"], :length => 8, :label => testdata["label"])
          expect(password).to eq testdata["password"]
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
oplop-2.1.0 spec/oplop_spec.rb