Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
it('can export budget level', inject(function(DownloadGeneratedFile, TestToolbox) {
var token = 123,
downloadUrl = DownloadGeneratedFile.budgetLevel(PROPOSAL_ID, BUDGET_1_ID).url;
scope.start_loader = angular.noop;
$httpBackend.expectGET(downloadUrl).respond({status: 'pending', token: token});
scope.downloadBudgetLevel(BUDGET_1_ID);
TestToolbox.httpBackendFlush($httpBackend);
// TODO: Should add more expectations when the DownloadManager is reworked.
// expect(_downloader.downloaded.url).toEqualData();
// expect(_mixpanel.analytics.track.eventName).toEqualData('Proposal: download budget level');
// expect(_mixpanel.analytics.track.properties.proposalId).toEqualData(PROPOSAL_ID);
// expect(_mixpanel.analytics.track.properties.budgetLevelId).toEqualData(BUDGET_1_ID);
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.