From a8e1eba10d9e2931477df7b72bd11a591f3f4a1e Mon Sep 17 00:00:00 2001 From: Lauren Voswinkel Date: Wed, 6 May 2020 10:50:58 -0700 Subject: [PATCH] Add better assertions for encryption test --- spec/integration/rails_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/integration/rails_spec.rb b/spec/integration/rails_spec.rb index 33d1da54..d52eca0c 100644 --- a/spec/integration/rails_spec.rb +++ b/spec/integration/rails_spec.rb @@ -199,7 +199,8 @@ it "encrypts attributes" do person = LazySinglePerson.create!(ssn: "123-45-6789") - expect(person.ssn_encrypted).to be + expect(person.ssn_encrypted.length).to eq(61) + expect(person.ssn_encrypted).to start_with("vault:v1:") expect(person.ssn_encrypted.encoding).to eq(Encoding::UTF_8) end