ensure primary email existing in secondary emails doesn't break everything

This commit is contained in:
Leo McArdle 2018-08-29 14:56:21 +01:00
Родитель 82fa4a532c
Коммит 211e171cc1
2 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -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