From 296a8781691ed46b4a0681da60a4306ecab3317f Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 17 May 2013 09:31:12 -0400 Subject: [PATCH] add flagging tests to DiscussionContentView --- .../view/discussion_content_view_spec.coffee | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/common/static/coffee/spec/discussion/view/discussion_content_view_spec.coffee b/common/static/coffee/spec/discussion/view/discussion_content_view_spec.coffee index 217f441803..add9de7db9 100644 --- a/common/static/coffee/spec/discussion/view/discussion_content_view_spec.coffee +++ b/common/static/coffee/spec/discussion/view/discussion_content_view_spec.coffee @@ -2,24 +2,26 @@ describe "DiscussionContentView", -> beforeEach -> setFixtures - """ -
-
- - + 0 -

Post Title

-

- robot - less than a minute ago -

-
-

Post body.

-
- Report Misuse
-
- Pin Thread
-
- """ + ( + """ +
+
+ + + 0 +

Post Title

+

+ robot + less than a minute ago +

+
+

Post body.

+
+ Report Misuse
+
+ Pin Thread
+
+ """) + @thread = new Thread { id: '01234567', user_id: '567', @@ -47,10 +49,9 @@ describe "DiscussionContentView", -> @thread.flagAbuse() expect(@thread.get 'abuse_flaggers').toEqual ['123', '567'] - it 'can be unflagged for abuse', -> - temp_array = [] - temp_array.push(window.user.get('id')) - @thread.set("abuse_flaggers",temp_array) - @thread.unflagAbuse() - expect(@thread.get 'abuse_flaggers').toEqual [] - \ No newline at end of file + it 'can be unflagged for abuse', -> + temp_array = [] + temp_array.push(window.user.get('id')) + @thread.set("abuse_flaggers",temp_array) + @thread.unflagAbuse() + expect(@thread.get 'abuse_flaggers').toEqual []