Skip to content
Snippets Groups Projects
Commit 6fb8adaa authored by Your Name's avatar Your Name
Browse files

add flagging and unflagging tests to response show view

parent ad5b71de
No related merge requests found
......@@ -49,3 +49,14 @@ describe 'ResponseCommentShowView', ->
it 'produces the correct HTML', ->
@view.render()
expect(@view.el.innerHTML).toContain('"discussion-flag-abuse notflagged"')
it 'can be flagged for abuse', ->
@response.flagAbuse()
expect(@response.get 'abuse_flaggers').toEqual ['123', '567']
it 'can be unflagged for abuse', ->
temp_array = []
temp_array.push(window.user.get('id'))
@response.set("abuse_flaggers",temp_array)
@response.unflagAbuse()
expect(@response.get 'abuse_flaggers').toEqual []
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment