From 82387a1f92b50b5a08153c30fd4da7b757e91256 Mon Sep 17 00:00:00 2001 From: Mike McCabe Date: Wed, 9 Oct 2013 13:18:32 -0400 Subject: [PATCH] updating spec to fail if salt is not defined --- spec/vulnerabilities/password_hashing_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/vulnerabilities/password_hashing_spec.rb b/spec/vulnerabilities/password_hashing_spec.rb index 2c2e7a6..2d9ddb0 100644 --- a/spec/vulnerabilities/password_hashing_spec.rb +++ b/spec/vulnerabilities/password_hashing_spec.rb @@ -21,6 +21,9 @@ feature 'improper password hashing' do @normal_user.password_confirmation = new_pass @normal_user.save pending(:if => verifying_fixed?) {Digest::MD5.hexdigest(@normal_user.salt + new_pass).should == @normal_user.password} + else + #fail test if salt attribute not defined + true.should == false end end end \ No newline at end of file