Commit 51e63a79 authored by Robert Speicher's avatar Robert Speicher

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.
parent c8fa8da2
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment