spec/integration/rails_spec.rb in vault-rails-0.2.0 vs spec/integration/rails_spec.rb in vault-rails-0.3.0
- old
+ new
@@ -260,6 +260,14 @@
expect(raw).to eq("xxxbluexxx")
expect(person.favorite_color).to eq("blue")
end
end
+
+ context 'with errors' do
+ it 'raises the appropriate exception' do
+ expect {
+ Vault::Rails.encrypt('/bogus/path', 'bogus', 'bogus')
+ }.to raise_error(Vault::HTTPClientError)
+ end
+ end
end