Skip to content
Snippets Groups Projects
Commit dbdccd5d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge pull request #8534 from jvanbaarsen/fix-wonky-tests

make sure the user.name is escaped
parents 5dbbec46 2a4ee2fd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -24,11 +24,12 @@ describe "User Feed", feature: true do
end
 
it "should have issue opened event" do
body.should have_content("#{user.name} opened issue ##{issue.iid}")
expect(body).to have_content("#{safe_name} opened issue ##{issue.iid}")
end
 
it "should have issue comment event" do
body.should have_content("#{user.name} commented on issue ##{issue.iid}")
expect(body).
to have_content("#{safe_name} commented on issue ##{issue.iid}")
end
end
end
Loading
Loading
@@ -40,4 +41,8 @@ describe "User Feed", feature: true do
def note_event(note, user)
EventCreateService.new.leave_note(note, user)
end
def safe_name
html_escape(user.name)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment