diff options
Diffstat (limited to 'js/tests/services/activefeedSpec.coffee')
-rw-r--r-- | js/tests/services/activefeedSpec.coffee | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/js/tests/services/activefeedSpec.coffee b/js/tests/services/activefeedSpec.coffee index f8b3a17ea..7268426e9 100644 --- a/js/tests/services/activefeedSpec.coffee +++ b/js/tests/services/activefeedSpec.coffee @@ -21,32 +21,25 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. ### -describe '_ActiveFeed', -> - +describe 'ActiveFeed', -> beforeEach module 'News' - beforeEach inject (@_ActiveFeed, @FeedType) => + beforeEach inject (@ActiveFeed, @FeedType) => @data = id: 5 type: 3 it 'should be Subscriptions by default', => - active = new @_ActiveFeed() - - expect(active.getType()).toBe(@FeedType.Subscriptions) + expect(@ActiveFeed.getType()).toBe(@FeedType.Subscriptions) it 'should set the correct feed id', => - active = new @_ActiveFeed() - active.handle(@data) - - expect(active.getId()).toBe(5) + @ActiveFeed.handle(@data) + expect(@ActiveFeed.getId()).toBe(5) it 'should set the correct feed type', => - active = new @_ActiveFeed() - active.handle(@data) - - expect(active.getType()).toBe(3)
\ No newline at end of file + @ActiveFeed.handle(@data) + expect(@ActiveFeed.getType()).toBe(3)
\ No newline at end of file |