diff options
Diffstat (limited to 'spec/features/ics')
-rw-r--r-- | spec/features/ics/dashboard_issues_spec.rb | 16 | ||||
-rw-r--r-- | spec/features/ics/group_issues_spec.rb | 16 | ||||
-rw-r--r-- | spec/features/ics/project_issues_spec.rb | 16 |
3 files changed, 42 insertions, 6 deletions
diff --git a/spec/features/ics/dashboard_issues_spec.rb b/spec/features/ics/dashboard_issues_spec.rb index 4a93a4b490a..1d0ea495757 100644 --- a/spec/features/ics/dashboard_issues_spec.rb +++ b/spec/features/ics/dashboard_issues_spec.rb @@ -4,8 +4,20 @@ require 'spec_helper' RSpec.describe 'Dashboard Issues Calendar Feed' do describe 'GET /issues' do - let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } - let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } + let!(:user) do + user = create(:user, email: 'private1@example.com') + public_email = create(:email, :confirmed, user: user, email: 'public1@example.com') + user.update!(public_email: public_email.email) + user + end + + let!(:assignee) do + user = create(:user, email: 'private2@example.com') + public_email = create(:email, :confirmed, user: user, email: 'public2@example.com') + user.update!(public_email: public_email.email) + user + end + let!(:project) { create(:project) } let(:milestone) { create(:milestone, project_id: project.id, title: 'v1.0') } diff --git a/spec/features/ics/group_issues_spec.rb b/spec/features/ics/group_issues_spec.rb index 05caca4b5a8..f29c39ad4ef 100644 --- a/spec/features/ics/group_issues_spec.rb +++ b/spec/features/ics/group_issues_spec.rb @@ -4,8 +4,20 @@ require 'spec_helper' RSpec.describe 'Group Issues Calendar Feed' do describe 'GET /issues' do - let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } - let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } + let!(:user) do + user = create(:user, email: 'private1@example.com') + public_email = create(:email, :confirmed, user: user, email: 'public1@example.com') + user.update!(public_email: public_email.email) + user + end + + let!(:assignee) do + user = create(:user, email: 'private2@example.com') + public_email = create(:email, :confirmed, user: user, email: 'public2@example.com') + user.update!(public_email: public_email.email) + user + end + let!(:group) { create(:group) } let!(:project) { create(:project, group: group) } diff --git a/spec/features/ics/project_issues_spec.rb b/spec/features/ics/project_issues_spec.rb index 58a1a32eac2..771748060bb 100644 --- a/spec/features/ics/project_issues_spec.rb +++ b/spec/features/ics/project_issues_spec.rb @@ -4,8 +4,20 @@ require 'spec_helper' RSpec.describe 'Project Issues Calendar Feed' do describe 'GET /issues' do - let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } - let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } + let!(:user) do + user = create(:user, email: 'private1@example.com') + public_email = create(:email, :confirmed, user: user, email: 'public1@example.com') + user.update!(public_email: public_email.email) + user + end + + let!(:assignee) do + user = create(:user, email: 'private2@example.com') + public_email = create(:email, :confirmed, user: user, email: 'public2@example.com') + user.update!(public_email: public_email.email) + user + end + let!(:project) { create(:project) } let!(:issue) { create(:issue, author: user, assignees: [assignee], project: project) } |