Commit 39f63889 authored by Jake Lear's avatar Jake Lear

Tests for EE issue#check_for_spam?

parent a2642f13
......@@ -374,17 +374,17 @@ RSpec.describe Issue do
expect(issue.check_for_spam?).to eq(check_for_spam?)
end
end
end
it 'does not check for spam when milestone is updated', :focus => true do
project = reusable_project
project.update(visibility_level: visibility_level)
issue = create(:issue, project: project, confidential: confidential, description: 'original description', author: author)
it 'does not check for spam when only weight is updated', :focus => true do
project = reusable_project
project.update(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
issue = create(:issue, project: project, weight: 3, author: author)
issue.assign_attributes(new_attributes)
issue.assign_attributes({ weight: 2 })
expect(issue.check_for_spam?).to eq(check_for_spam?)
end
end
expect(issue.check_for_spam?).to eq(false)
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