Commit 01bdfb12 by Waqas Khalid

Merge pull request #7403 from edx/waqas/tnl1717-discussion-404

View discussion of user profile return 404
parents dad4b673 daadfeab
......@@ -18,6 +18,7 @@ describe "DiscussionThreadProfileView", ->
body: "dummy body",
discussion: new Discussion()
abuse_flaggers: [],
commentable_id: 'dummy_discussion',
votes: {up_count: "42"}
}
@imageTag = '<img src="https://www.google.com.pk/images/srpr/logo11w.png">'
......@@ -111,3 +112,7 @@ describe "DiscussionThreadProfileView", ->
for truncatedText in [true, false]
it "body with #{numImages} images and #{if truncatedText then "truncated" else "untruncated"} text", ->
checkPostWithImages(numImages, truncatedText, @threadData, @imageTag)
it "check the thread retrieve url", ->
thread = makeThread(@threadData)
expect(thread.urlFor('retrieve')).toBe('/courses/edX/999/test/discussion/forum/dummy_discussion/threads/1')
......@@ -126,7 +126,7 @@ if Backbone?
class @Thread extends @Content
urlMappers:
'retrieve' : -> DiscussionUtil.urlFor('retrieve_single_thread', @discussion.id, @id)
'retrieve' : -> DiscussionUtil.urlFor('retrieve_single_thread', @.get('commentable_id'), @id)
'reply' : -> DiscussionUtil.urlFor('create_comment', @id)
'unvote' : -> DiscussionUtil.urlFor("undo_vote_for_#{@get('type')}", @id)
'upvote' : -> DiscussionUtil.urlFor("upvote_#{@get('type')}", @id)
......
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