Add additional scope check to Todo#for_target spec
This works around a condition where the Issue and the MergeRequest created by FactoryBoth both had the same ID, which caused `for_target` to return two records when we only expected one.
This commit is contained in:
parent
c8fa8da2e8
commit
51e63a795e
1 changed files with 2 additions and 1 deletions
|
@ -236,7 +236,8 @@ describe Todo do
|
|||
|
||||
create(:todo, target: create(:merge_request))
|
||||
|
||||
expect(described_class.for_target(todo.target)).to eq([todo])
|
||||
expect(described_class.for_type(Issue.name).for_target(todo.target))
|
||||
.to contain_exactly(todo)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue