Commit 41c96c45 authored by Alexis Reigel's avatar Alexis Reigel

test with a gpg key with multiple emails

parent 5ce61120
...@@ -16,7 +16,7 @@ feature 'Profile > GPG Keys', :gpg do ...@@ -16,7 +16,7 @@ feature 'Profile > GPG Keys', :gpg do
fill_in('Key', with: attributes_for(:gpg_key)[:key]) fill_in('Key', with: attributes_for(:gpg_key)[:key])
click_button('Add key') click_button('Add key')
expect(page).to have_content(GpgHelpers::User1.email) expect(page).to have_content(GpgHelpers::User1.emails.join)
expect(page).to have_content(GpgHelpers::User1.fingerprint) expect(page).to have_content(GpgHelpers::User1.fingerprint)
end end
end end
...@@ -25,7 +25,7 @@ feature 'Profile > GPG Keys', :gpg do ...@@ -25,7 +25,7 @@ feature 'Profile > GPG Keys', :gpg do
create(:gpg_key, user: user) create(:gpg_key, user: user)
visit profile_gpg_keys_path visit profile_gpg_keys_path
expect(page).to have_content(GpgHelpers::User1.email) expect(page).to have_content(GpgHelpers::User1.emails.join)
expect(page).to have_content(GpgHelpers::User1.fingerprint) expect(page).to have_content(GpgHelpers::User1.fingerprint)
end end
......
...@@ -59,7 +59,7 @@ describe GpgKey do ...@@ -59,7 +59,7 @@ describe GpgKey do
it 'returns the emails from the gpg key' do it 'returns the emails from the gpg key' do
gpg_key = create :gpg_key, key: GpgHelpers::User1.public_key gpg_key = create :gpg_key, key: GpgHelpers::User1.public_key
expect(gpg_key.emails).to eq [GpgHelpers::User1.email] expect(gpg_key.emails).to eq GpgHelpers::User1.emails
end end
end end
end end
...@@ -98,8 +98,8 @@ module GpgHelpers ...@@ -98,8 +98,8 @@ module GpgHelpers
'5F7EA3981A5845B141ABD522CCFBE19F00AC8B1D' '5F7EA3981A5845B141ABD522CCFBE19F00AC8B1D'
end end
def email def emails
'nannie.bernhard@example.com' ['nannie.bernhard@example.com']
end end
end end
...@@ -161,15 +161,20 @@ module GpgHelpers ...@@ -161,15 +161,20 @@ module GpgHelpers
iLgEEwECACIFAliuqioCGwMGCwkIBwMCBhUIAgkKCwQW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ZdqkMTHUVF9Gd+g/5KDODdJbOjwH+l63b/bOiATDFbiNBFiuqioBBADe
FWkOyFnebKY6V2kuIqAjn5GXqZm07hO0z0FjOIgQLbiH4iRosHKVljPiiB9vNcoX 5nUdVOcbZlnxOjl0KBAT+A5bmyBLUT0BmLPsmA4PuXDSth7WvibPC8wcCdCYVk0I
wnG0c8xS7AlUMQ== RMYneZUiWq/o5c4rthfLR4jg8kruvomQ4E4d4hyI6R0MLxXYZ3XMu67VuScFgbLU
=Erp5 Rw1eRZ16ANd3Nc1VuFW7ms0vCG0idB8iSZBoULaK8QARAQABiJ8EGAECAAkFAliu
qioCGwwACgkQv52SX5Ee/WVCCAQA1bBDCuVPYEUtZXwXH7CWDfX6ZyOROrQtpa7e
i54CW6hKX3fYHpOiu4yHromjGlINTjjHclsJpn/qmiJizkB9/xl7IRWV+RVpDshZ
3mymOldpLiKgI5+Rl6mZtO4TtM9BYziIEC24h+IkaLBylZYz4ogfbzXKF8JxtHPM
UuwJVDE=
=0vYo
-----END PGP PUBLIC KEY BLOCK----- -----END PGP PUBLIC KEY BLOCK-----
KEY KEY
end end
...@@ -182,8 +187,8 @@ module GpgHelpers ...@@ -182,8 +187,8 @@ module GpgHelpers
'6D494CA6FC90C0CAE0910E42BF9D925F911EFD65' '6D494CA6FC90C0CAE0910E42BF9D925F911EFD65'
end end
def email def emails
'bette.cartwright@example.com' ['bette.cartwright@example.com', 'bette.cartwright@example.net']
end end
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