{I" class:ETI"ProcessedAsset;FI"logical_path;TI"&social_networking/notices_spec.js;FI" pathname;TI"a/Users/ems408/workspace/social_networking/spec/javascripts/social_networking/notices_spec.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+;_UI" length;TiÞI" digest;TI"%ffd1894dc1dcac8ee6d2a26afb33cbe9;FI" source;TI"Þdescribe('Notice', function() { var server, noticeUtility, callback; var actionType, description, participantId; beforeEach(function() { actionType = "SocialNetworking::Goal"; description = "Completed a goal." participantId = 1; server = sinon.fakeServer.create(); callback = sinon.spy(); noticeUtility = window.Notice }); afterEach(function() { server.restore(); }); describe('#behaviorPostNotice', function() { it('should trigger #behaviorRealTimeToast upon success', function() { expect(noticeUtility.behaviorPostNotice).toBeTruthy(); noticeUtility.behaviorRealTimeToast = callback; noticeUtility.behaviorPostNotice(actionType, description, participantId); expect(server.requests.length).toBe(1); expect(server.requests[0].url).toBe("/participant_behaviors/complete"); }); }); describe('#incentivePostNotice', function() { it('should trigger #incentivRealTimeToast upon success', function() { expect(noticeUtility.incentivePostNotice).toBeTruthy(); noticeUtility.incentivRealTimeToast = callback; noticeUtility.incentivePostNotice(actionType, description, participantId); expect(server.requests.length).toBe(1); expect(server.requests[0].url).toBe("/participant_incentives/complete"); }); }); it('should offer a public incentive specific notification function (behaviorPostNotice)', function() { expect(noticeUtility.behaviorPostNotice).toBeTruthy(); }); }); ;TI"dependency_digest;TI"%dcd311b85a0fdba59acf5dd0428447c1;FI"required_paths;T[I"a/Users/ems408/workspace/social_networking/spec/javascripts/social_networking/notices_spec.js;FI"dependency_paths;T[{I" path;TI"a/Users/ems408/workspace/social_networking/spec/javascripts/social_networking/notices_spec.js;F@I"2015-05-22T09:20:07-05:00;T@I"%b8f7babcc70a1fdb99f23fa40d58619c;FI" _version;TI"%883b724e06f474a3db2deee10c127ab9;F