Improve thread list view tests

An obsolete test case was passing because the assertions were too weak,
so the assertions are improved and the test case removed.
This commit is contained in:
Greg Price
2014-09-04 17:13:30 -04:00
parent d2a9b53e27
commit 5c8daf4144

View File

@@ -475,6 +475,7 @@ describe "DiscussionThreadListView", ->
testSelectionRequest = (callback, itemText) ->
setupAjax(callback)
$(".forum-nav-browse-title:contains(#{itemText})").click()
expect($.ajax).toHaveBeenCalled()
it "should get all discussions", ->
testSelectionRequest(
@@ -482,15 +483,6 @@ describe "DiscussionThreadListView", ->
"All"
)
it "should get flagged threads", ->
testSelectionRequest(
(params) ->
expect(params.url.path()).toEqual(DiscussionUtil.urlFor("search"))
expect(params.data.flagged).toEqual(true)
,
"Flagged"
)
it "should get followed threads", ->
testSelectionRequest(
(params) ->