summaryrefslogtreecommitdiff
path: root/spec/models/issue_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r--spec/models/issue_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb
index d057c9cf6e9..11befd4edfe 100644
--- a/spec/models/issue_spec.rb
+++ b/spec/models/issue_spec.rb
@@ -361,7 +361,10 @@ describe Issue, models: true do
it 'updates when assignees change' do
user1 = create(:user)
user2 = create(:user)
- issue = create(:issue, assignee: user1)
+ project = create(:empty_project)
+ issue = create(:issue, assignee: user1, project: project)
+ project.add_developer(user1)
+ project.add_developer(user2)
expect(user1.assigned_open_issues_count).to eq(1)
expect(user2.assigned_open_issues_count).to eq(0)