ensure primary email existing in secondary emails doesn't break everything
This commit is contained in:
Родитель
82fa4a532c
Коммит
211e171cc1
|
@ -1,6 +1,6 @@
|
|||
# name: mozilla-iam
|
||||
# about: A plugin to integrate Discourse with Mozilla's Identity and Access Management (IAM) system
|
||||
# version: 0.2.1
|
||||
# version: 0.2.2
|
||||
# authors: Leo McArdle
|
||||
# url: https://github.com/mozilla/discourse-mozilla-iam
|
||||
|
||||
|
|
|
@ -108,5 +108,16 @@ describe MozillaIAM::Profile do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "when primary email is in profile secondary emails" do
|
||||
before { mock_profile_emails("two@email.com", "one@email.com", "four@email.com") }
|
||||
|
||||
include_examples "leaves primary"
|
||||
|
||||
it "sets remaining secondary emails" do
|
||||
profile.send(:update_emails)
|
||||
expect(user.secondary_emails).to contain_exactly("two@email.com", "four@email.com")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче