spec/jwe_spec.rb in jwe-0.1.1 vs spec/jwe_spec.rb in jwe-0.2.0

- old
+ new

@@ -19,11 +19,12 @@ end end describe 'when using dir alg method' do it 'roundtrips' do - encrypted = JWE.encrypt(plaintext, password, alg: 'dir') - result = JWE.decrypt(encrypted, password) + aes_password = SecureRandom.random_bytes(16) + encrypted = JWE.encrypt(plaintext, aes_password, alg: 'dir') + result = JWE.decrypt(encrypted, aes_password) expect(result).to eq plaintext end end