Commit d9fd3709 authored by Alexis Reigel's avatar Alexis Reigel

use hash instead of 2d array

parent 075dae65
...@@ -47,7 +47,7 @@ class GpgKey < ActiveRecord::Base ...@@ -47,7 +47,7 @@ class GpgKey < ActiveRecord::Base
email, email,
email == user.email email == user.email
] ]
end end.to_h
end end
def verified? def verified?
......
...@@ -58,10 +58,10 @@ describe GpgKey do ...@@ -58,10 +58,10 @@ describe GpgKey do
user = create :user, email: 'bette.cartwright@example.com' user = create :user, email: 'bette.cartwright@example.com'
gpg_key = create :gpg_key, key: GpgHelpers::User2.public_key, user: user gpg_key = create :gpg_key, key: GpgHelpers::User2.public_key, user: user
expect(gpg_key.emails_with_verified_status).to match_array [ expect(gpg_key.emails_with_verified_status).to eq(
['bette.cartwright@example.com', true], 'bette.cartwright@example.com' => true,
['bette.cartwright@example.net', false] 'bette.cartwright@example.net' => false
] )
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment