discourse/discourse — pull request #1615 by velesin (2013-11-05 17:08:07+00:00)
Title: adds integration tests for notifications dropdown in header

I'd like to refactor notifications dropdown. First of all, extract it from header template (similarly to search dropdown: https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/header.js.handlebars#L95). Second, I'd like to clean it up, as there are some mixed concerns in notifications related code, e.g. HeaderView loads model data (https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/views/header_view.js#L54) what is not a responsibility of a view, Notification model contains presentation related code (https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/models/notification.js#L11) what is not a responsibility of a model etc.

I plan to again do it in 3 steps:
- cover current notifications code with a safety net of integration tests (this pull request)
- refactor code / add unit tests
- clean up integration tests, leaving only the minimal set, verifying that all is wired correctly